This commit is contained in:
Paul 2001-07-12 21:20:06 +00:00
parent faf6ba85e6
commit 6c270f1d91

View file

@ -94,6 +94,10 @@
#include "game/game.h" #include "game/game.h"
#endif #endif
#ifndef __FX_FX_H__
#include "fx\fx.h"
#endif
/* Std Lib /* Std Lib
------- */ ------- */
@ -341,11 +345,20 @@ void CPlayerModeBase::thinkVerticalMovement()
playerHasHitGround(); playerHasHitGround();
pos=m_player->getPlayerPos(); pos=m_player->getPlayerPos();
if(m_player->getHeightFromGround(pos.vx,pos.vy,5)==0&& if(m_player->getHeightFromGround(pos.vx,pos.vy,5)==0&&
(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_player->getIsHelmetSoFullThatIDontNeedToSoakUp())
{ {
// Hit water - Go into soakup mode // Hit water - Make a splash!
setState(STATE_SOAKUP); DVECTOR pos;
CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_SPLASH_INTO_WATER);
pos=getPlayerPos();
pos.vy-=40;
CFX::Create(CFX::FX_TYPE_SPLASH_WATER,pos);
if(!m_player->getIsHelmetSoFullThatIDontNeedToSoakUp())
{
// Not got full water levels - Go into soakup mode
setState(STATE_SOAKUP);
}
} }
} }
else if(m_currentState!=STATE_FALL&&m_currentState!=STATE_FALLFAR&& // Hmm.. (pkg) else if(m_currentState!=STATE_FALL&&m_currentState!=STATE_FALLFAR&& // Hmm.. (pkg)