This commit is contained in:
parent
68dd88f3ea
commit
d498db0e34
2 changed files with 55 additions and 50 deletions
|
@ -812,6 +812,8 @@ if(newmode!=-1)
|
|||
|
||||
// Only do the weapon change stuff on the first frame. As the buttons pressed do not
|
||||
// change over these frames there is no point in doing it every frame
|
||||
if(m_currentMode!=PLAYER_MODE_DEAD)
|
||||
{
|
||||
if(i==0&&m_currentPlayerModeClass->getState()!=STATE_CELEBRATE)
|
||||
{
|
||||
m_tryingToManuallyPickupWeapon=false;
|
||||
|
@ -827,8 +829,7 @@ if(newmode!=-1)
|
|||
if(m_currentMode!=PLAYER_MODE_CART && getPadInputDown()&PI_WEAPONCHANGE)
|
||||
{
|
||||
// If already armed then drop current weapon
|
||||
if(m_currentMode!=PLAYER_MODE_BASICUNARMED&&
|
||||
m_currentMode!=PLAYER_MODE_DEAD)
|
||||
if(m_currentMode!=PLAYER_MODE_BASICUNARMED)
|
||||
{
|
||||
static const int s_pickupsToDrop[NUM_PLAYERMODES]=
|
||||
{
|
||||
|
@ -864,6 +865,13 @@ if(newmode!=-1)
|
|||
m_tryingToManuallyPickupWeapon=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Don't try to pick up weapons when dead.. doh!
|
||||
m_tryingToAutomaticallyPickupWeapon=false;
|
||||
m_tryingToManuallyPickupWeapon=false;
|
||||
}
|
||||
|
||||
int level=GameScene.getLevelNumber();
|
||||
// Out of spats?
|
||||
|
@ -1009,7 +1017,7 @@ if(newmode!=-1)
|
|||
#endif
|
||||
|
||||
// Stop the player vanishing off the edge of the telly..
|
||||
if(!m_lockCamera)
|
||||
if(m_currentMode!=PLAYER_MODE_DEAD) // Lock camera when player is dead
|
||||
{
|
||||
if(Pos.vx<m_playerPosLimitBox.x1) Pos.vx=m_playerPosLimitBox.x1;
|
||||
else if(Pos.vx>m_playerPosLimitBox.x2) Pos.vx=m_playerPosLimitBox.x2;
|
||||
|
@ -1228,7 +1236,7 @@ if(newmode!=-1)
|
|||
yoff=m_cameraLookOffset+(m_ledgeLookOffset>>ledgeShift);
|
||||
if(yoff<-camerahardlockup)yoff=-camerahardlockup;
|
||||
else if(yoff>camerahardlockdown)yoff=camerahardlockdown;
|
||||
if(!m_lockCamera)
|
||||
if(m_currentMode!=PLAYER_MODE_DEAD) // Lock camera when player is dead
|
||||
{
|
||||
m_cameraPos.vx=m_currentCamFocusPoint.vx;
|
||||
m_cameraPos.vy=m_currentCamFocusPoint.vy+yoff;
|
||||
|
@ -1965,7 +1973,6 @@ void CPlayer::respawn()
|
|||
Pos=m_respawnPos;
|
||||
m_cameraLookOffset=0;
|
||||
|
||||
m_lockCamera=false;
|
||||
m_cameraXScrollDir=0;
|
||||
m_cameraXScrollPos=0;
|
||||
|
||||
|
@ -2382,7 +2389,6 @@ void CPlayer::dieYouPorousFreak(DEATH_TYPE _deathType)
|
|||
m_deathType=_deathType;
|
||||
CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_DEFEATED_JINGLE);
|
||||
setMode(PLAYER_MODE_DEAD);
|
||||
m_lockCamera=true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -336,7 +336,6 @@ private:
|
|||
|
||||
int m_cartCamActive;
|
||||
int m_reverseCameraMovement;
|
||||
int m_lockCamera;
|
||||
DVECTOR m_cameraPos;
|
||||
DVECTOR m_currentCamFocusPointTarget;
|
||||
DVECTOR m_currentCamFocusPoint;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue