This commit is contained in:
Paul 2001-06-04 14:41:56 +00:00
parent 7d1ffdb18d
commit 211da43754
3 changed files with 20 additions and 3 deletions

View File

@ -805,11 +805,13 @@ if(newmode!=-1)
// Think for the current player mode
m_currentPlayerModeClass->think();
// Conveyor belt movement
// Is player stood on any special collision?
if(getHeightFromGroundNoPlatform(Pos.vx,Pos.vy,5)==0)
{
int block;
block=CGameScene::getCollision()->getCollisionBlock(Pos.vx,Pos.vy)&COLLISION_TYPE_MASK;
// Conveyor belt movement
if(block==COLLISION_TYPE_FLAG_MOVE_LEFT)
{
moveHorizontal(-1);
@ -818,6 +820,18 @@ if(newmode!=-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
@ -1861,8 +1875,7 @@ int CPlayer::canDoLookAround()
void CPlayer::inSoakUpState()
{
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;
if(m_healthWaterLevel>WATERMAXHEALTH)

View File

@ -130,6 +130,7 @@ typedef enum
DEATHTYPE__NORMAL,
DEATHTYPE__DRYUP,
DEATHTYPE__SQUASH,
DEATHTYPE__LIQUID,
} DEATH_TYPE;
typedef enum

View File

@ -73,6 +73,9 @@ void CPlayerModeDead::enter()
case DEATHTYPE__SQUASH:
deathAnim=ANIM_SPONGEBOB_DEATHSQUASH;
break;
case DEATHTYPE__LIQUID:
deathAnim=ANIM_SPONGEBOB_DEATHSPIN;
break;
}
m_player->setAnimNo(deathAnim);
}