This commit is contained in:
parent
30272803d0
commit
25de06c1a6
21 changed files with 595 additions and 41 deletions
|
@ -57,12 +57,21 @@ void CRestartPointTrigger::collidedWith(CThing *_thisThing)
|
|||
CRECT collisionArea;
|
||||
DVECTOR respawnPos;
|
||||
|
||||
ASSERT(_thisThing->getThingType()==TYPE_PLAYER);
|
||||
switch( _thisThing->getThingType() )
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
collisionArea=getCollisionArea();
|
||||
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
||||
respawnPos.vy=collisionArea.y2;
|
||||
((CPlayer*)_thisThing)->setRespawnPos(respawnPos);
|
||||
|
||||
collisionArea=getCollisionArea();
|
||||
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
||||
respawnPos.vy=collisionArea.y2;
|
||||
((CPlayer*)_thisThing)->setRespawnPos(respawnPos);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue