This commit is contained in:
parent
7d1ffdb18d
commit
211da43754
@ -805,11 +805,13 @@ if(newmode!=-1)
|
|||||||
// Think for the current player mode
|
// Think for the current player mode
|
||||||
m_currentPlayerModeClass->think();
|
m_currentPlayerModeClass->think();
|
||||||
|
|
||||||
// Conveyor belt movement
|
// Is player stood on any special collision?
|
||||||
if(getHeightFromGroundNoPlatform(Pos.vx,Pos.vy,5)==0)
|
if(getHeightFromGroundNoPlatform(Pos.vx,Pos.vy,5)==0)
|
||||||
{
|
{
|
||||||
int block;
|
int block;
|
||||||
block=CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK;
|
block=CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK;
|
||||||
|
|
||||||
|
// Conveyor belt movement
|
||||||
if(block==COLLISION_TYPE_FLAG_MOVE_LEFT)
|
if(block==COLLISION_TYPE_FLAG_MOVE_LEFT)
|
||||||
{
|
{
|
||||||
moveHorizontal(-1);
|
moveHorizontal(-1);
|
||||||
@ -818,6 +820,18 @@ if(newmode!=-1)
|
|||||||
{
|
{
|
||||||
moveHorizontal(+1);
|
moveHorizontal(+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Death?
|
||||||
|
else if(m_currentMode!=PLAYER_MODE_DEAD&&
|
||||||
|
block==COLLISION_TYPE_FLAG_DEATH_LIQUID)
|
||||||
|
{
|
||||||
|
dieYouPorousFreak(DEATHTYPE__LIQUID);
|
||||||
|
}
|
||||||
|
else if(m_currentMode!=PLAYER_MODE_DEAD&&
|
||||||
|
block==COLLISION_TYPE_FLAG_DEATH_INSTANT)
|
||||||
|
{
|
||||||
|
dieYouPorousFreak(DEATHTYPE__NORMAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Powerups
|
// Powerups
|
||||||
@ -1861,7 +1875,6 @@ int CPlayer::canDoLookAround()
|
|||||||
void CPlayer::inSoakUpState()
|
void CPlayer::inSoakUpState()
|
||||||
{
|
{
|
||||||
if(isWearingDivingHelmet()&&
|
if(isWearingDivingHelmet()&&
|
||||||
// (CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK)==COLLISION_TYPE_FLAG_DEATH_LIQUID)
|
|
||||||
(CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK)==COLLISION_TYPE_FLAG_SOAKUP)
|
(CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK)==COLLISION_TYPE_FLAG_SOAKUP)
|
||||||
{
|
{
|
||||||
m_healthWaterLevel+=waterSoakUpSpeed;
|
m_healthWaterLevel+=waterSoakUpSpeed;
|
||||||
|
@ -130,6 +130,7 @@ typedef enum
|
|||||||
DEATHTYPE__NORMAL,
|
DEATHTYPE__NORMAL,
|
||||||
DEATHTYPE__DRYUP,
|
DEATHTYPE__DRYUP,
|
||||||
DEATHTYPE__SQUASH,
|
DEATHTYPE__SQUASH,
|
||||||
|
DEATHTYPE__LIQUID,
|
||||||
} DEATH_TYPE;
|
} DEATH_TYPE;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -73,6 +73,9 @@ void CPlayerModeDead::enter()
|
|||||||
case DEATHTYPE__SQUASH:
|
case DEATHTYPE__SQUASH:
|
||||||
deathAnim=ANIM_SPONGEBOB_DEATHSQUASH;
|
deathAnim=ANIM_SPONGEBOB_DEATHSQUASH;
|
||||||
break;
|
break;
|
||||||
|
case DEATHTYPE__LIQUID:
|
||||||
|
deathAnim=ANIM_SPONGEBOB_DEATHSPIN;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
m_player->setAnimNo(deathAnim);
|
m_player->setAnimNo(deathAnim);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user