This commit is contained in:
parent
898cecc036
commit
dd94063c01
@ -741,7 +741,8 @@ if(newmode!=-1)
|
||||
#ifdef __USER_paul__
|
||||
if(PadGetDown(0)&PAD_TRIANGLE)
|
||||
{
|
||||
springPlayerUp();
|
||||
CLevel &level=GameScene.GetLevel();
|
||||
level.destroyMapTile(Pos);
|
||||
}
|
||||
#endif
|
||||
///
|
||||
@ -1356,6 +1357,24 @@ if(drawlastpos)
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose: Like the normal setRespawnPos() but plays the telephone ring sound if
|
||||
this is not the current respawn point. To be used from the respawn triggers
|
||||
so that they make the ring sound
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CPlayer::setRespawnPosAndRingTelephone(DVECTOR _respawn)
|
||||
{
|
||||
if(m_respawnPos.vx!=_respawn.vx&&
|
||||
m_respawnPos.vy!=_respawn.vy)
|
||||
{
|
||||
CSoundMediator::playSfx(CSoundMediator::SFX_TELEPHONE_BOX);
|
||||
setRespawnPos(_respawn);
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
|
@ -217,6 +217,7 @@ public:
|
||||
|
||||
void setCameraBox(CameraBox _cameraBox);
|
||||
void setRespawnPos(DVECTOR _respawn) {m_respawnPos=_respawn;}
|
||||
void setRespawnPosAndRingTelephone(DVECTOR _respawn);
|
||||
|
||||
// This isn't funny anymore.. :(
|
||||
int getHeightFromGround(int _x,int _y,int _maxHeight=32);
|
||||
|
@ -64,7 +64,7 @@ void CRestartPointTrigger::collidedWith(CThing *_thisThing)
|
||||
collisionArea=getCollisionArea();
|
||||
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
||||
respawnPos.vy=collisionArea.y2;
|
||||
((CPlayer*)_thisThing)->setRespawnPos(respawnPos);
|
||||
((CPlayer*)_thisThing)->setRespawnPosAndRingTelephone(respawnPos);
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user