SBSPSS/source/triggers/tteleprt.cpp
Charles a264a46b1f
2001-07-26 16:16:36 +00:00

73 lines
1.5 KiB
C++

/*=========================================================================
tteleprt.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "triggers\trigger.h"
#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)
{
switch( _thisThing->getThingType() )
{
case TYPE_PLAYER:
{
((CPlayer*)_thisThing)->clearPlatform();
((CPlayer*)_thisThing)->teleportTo(m_boxX1+8,m_boxY1+16);
break;
}
default:
break;
}
}
/*===========================================================================
end */