This commit is contained in:
parent
994cbb07ca
commit
3d04467ef8
3 changed files with 13 additions and 10 deletions
Binary file not shown.
Binary file not shown.
|
@ -766,18 +766,21 @@ void CNpcSubSharkEnemy::collidedWith(CThing *_thisThing)
|
||||||
|
|
||||||
if(playerState==ATTACK_STATE__NONE)
|
if(playerState==ATTACK_STATE__NONE)
|
||||||
{
|
{
|
||||||
CPlayer *player = GameScene.getPlayer();
|
if ( !player->isRecoveringFromHit() )
|
||||||
|
|
||||||
if ( !player->isRecoveringFromHit() && !m_carryPlayer )
|
|
||||||
{
|
{
|
||||||
player->takeDamage( m_data[m_type].damageToUserType,REACT__GET_DIRECTION_FROM_THING,(CThing*)this );
|
CPlayer *player = GameScene.getPlayer();
|
||||||
}
|
|
||||||
|
|
||||||
if ( m_state == SUB_SHARK_CHARGE && player->getMode() != PLAYER_MODE_SWALLOW )
|
if ( !player->isRecoveringFromHit() && !m_carryPlayer )
|
||||||
{
|
{
|
||||||
m_carryPlayer = true;
|
player->takeDamage( m_data[m_type].damageToUserType,REACT__GET_DIRECTION_FROM_THING,(CThing*)this );
|
||||||
m_oldPlayerMode = player->getMode();
|
}
|
||||||
player->setMode( PLAYER_MODE_SWALLOW );
|
|
||||||
|
if ( m_state == SUB_SHARK_CHARGE && player->getMode() != PLAYER_MODE_SWALLOW )
|
||||||
|
{
|
||||||
|
m_carryPlayer = true;
|
||||||
|
m_oldPlayerMode = player->getMode();
|
||||||
|
player->setMode( PLAYER_MODE_SWALLOW );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_invulnerableTimer <= 0 )
|
else if ( m_invulnerableTimer <= 0 )
|
||||||
|
|
Loading…
Add table
Reference in a new issue