This commit is contained in:
parent
097c54d7cc
commit
dfd36d956e
7 changed files with 72 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue