SBSPSS/source/triggers/thazwalk.cpp
Charles 432cba9e4f
2001-06-05 15:59:51 +00:00

86 lines
1.6 KiB
C++

/*=========================================================================
thazwalk.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "triggers\trigger.h"
#include "triggers\thazwalk.h"
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CHazardWalkTrigger::collidedWith(CThing *_thisThing)
{
if ( m_timeout <= 0 )
{
switch( _thisThing->getThingType() )
{
case TYPE_PLAYER:
{
CPlayer *player = (CPlayer *) _thisThing;
if ( m_hazard )
{
m_hazard->trigger();
m_hazard = NULL;
}
break;
}
default:
break;
}
}
}
/*===========================================================================
end */