This commit is contained in:
parent
ec4f5f9375
commit
a8a436a7a0
6 changed files with 34 additions and 3 deletions
|
@ -53,6 +53,16 @@
|
|||
---------------------------------------------------------------------- */
|
||||
void CTeleportTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
CRECT collisionArea;
|
||||
DVECTOR respawnPos;
|
||||
|
||||
ASSERT(_thisThing->getThingType()==TYPE_PLAYER);
|
||||
|
||||
collisionArea=getCollisionArea();
|
||||
respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2);
|
||||
respawnPos.vy=collisionArea.y2;
|
||||
((CPlayer*)_thisThing)->setPos(TargetPos);
|
||||
|
||||
/*
|
||||
CRECT collisionArea;
|
||||
DVECTOR respawnPos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue