This commit is contained in:
Charles 2001-06-05 15:59:51 +00:00
parent c2ab404cf6
commit 432cba9e4f
4 changed files with 381 additions and 0 deletions

View file

@ -0,0 +1,85 @@
/*=========================================================================
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 */