This commit is contained in:
Charles 2001-07-09 19:38:58 +00:00
parent 097c54d7cc
commit dfd36d956e
7 changed files with 72 additions and 2 deletions

View file

@ -27,6 +27,10 @@
#include "game\game.h"
#endif
#ifndef __FRIEND_FRIEND_H__
#include "friend\friend.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -216,3 +220,39 @@ void CNpcRisingWeightHazard::render()
}
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcRisingWeightHazard::collidedWith( CThing *_thisThing )
{
if ( m_isActive )
{
switch(_thisThing->getThingType())
{
case TYPE_PLAYER:
{
CPlayer *player = (CPlayer *) _thisThing;
if ( !player->isRecoveringFromHit() )
{
player->takeDamage( DAMAGE__HIT_ENEMY );
}
break;
}
case TYPE_NPC:
{
CNpcFriend *npcFriend = (CNpcFriend *) _thisThing;
npcFriend->setObstructed();
break;
}
default:
ASSERT(0);
break;
}
}
}