This commit is contained in:
Paul 2001-05-30 21:00:50 +00:00
parent 01e9f62ea7
commit 3a83575bac
2 changed files with 16 additions and 3 deletions

View File

@ -133,14 +133,19 @@ void CPlayerStateButtBounceFall::think(CPlayerModeBase *_playerMode)
---------------------------------------------------------------------- */
void CPlayerStateButtBounceLand::enter(CPlayerModeBase *_playerMode)
{
m_bounceOffFloor=false;
if(_playerMode->getIsInWater())
{
DVECTOR pos;
CLevel &level=GameScene.GetLevel();
pos=_playerMode->getPlayerPos();
CGameBubicleFactory::spawnBubicles(pos.vx-20,pos.vy,40,10,CGameBubicleFactory::TYPE_MEDIUM);
level.destroyMapArea(pos);
if((CGameScene::getCollision()->getCollisionBlock(pos.vx,pos.vy)&COLLISION_TYPE_MASK)==COLLISION_TYPE_FLAG_DESTRUCTABLE_WALL)
{
CLevel &level=GameScene.GetLevel();
CGameBubicleFactory::spawnBubicles(pos.vx-20,pos.vy,40,10,CGameBubicleFactory::TYPE_MEDIUM);
level.destroyMapArea(pos);
m_bounceOffFloor=true;
}
}
}
@ -153,6 +158,11 @@ void CPlayerStateButtBounceLand::enter(CPlayerModeBase *_playerMode)
---------------------------------------------------------------------- */
void CPlayerStateButtBounceLand::think(CPlayerModeBase *_playerMode)
{
if(m_bounceOffFloor)
{
_playerMode->setState(STATE_BUTTBOUNCEUP);
}
if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim())
{
_playerMode->setState(STATE_IDLE);

View File

@ -54,6 +54,9 @@ public:
virtual void enter(class CPlayerModeBase *_playerMode);
virtual void think(class CPlayerModeBase *_playerMode);
private:
int m_bounceOffFloor;
};
class CPlayerStateButtBounceUp : public CPlayerState