This commit is contained in:
parent
be1ae5d646
commit
921bdbac48
71
source/triggers/tteleprt.cpp
Normal file
71
source/triggers/tteleprt.cpp
Normal file
@ -0,0 +1,71 @@
|
||||
/*=========================================================================
|
||||
|
||||
tteleprt.cpp
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "triggers\tteleprt.h"
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/* Data
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
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)->setRespawnPos(respawnPos);
|
||||
*/
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
57
source/triggers/tteleprt.h
Normal file
57
source/triggers/tteleprt.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*=========================================================================
|
||||
|
||||
tteleprt.h
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TTELEPRT_H__
|
||||
#define __TRIGGERS_TTELEPRT_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#ifndef __THING_THING_H__
|
||||
#include "thing/thing.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CTeleportTrigger : public CTriggerThing
|
||||
{
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Functions
|
||||
--------- */
|
||||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif /* __TRIGGERS_TTELEPRT_H__ */
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Reference in New Issue
Block a user