This commit is contained in:
parent
3a10910187
commit
07c358c793
11 changed files with 156 additions and 13 deletions
|
@ -13,6 +13,10 @@
|
|||
#include "level\layercollision.h"
|
||||
#include "FX\FXBaseAnim.h"
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
void CFXBaseAnim::init(DVECTOR const &_Pos)
|
||||
|
@ -108,3 +112,32 @@ POLY_FT4 *Ft4=SprBank->printRotatedScaledSprite(renderFrame,RenderPos.vx,RenderP
|
|||
setShadeTex(Ft4,0);
|
||||
setRGB0(Ft4,DataPtr->R,DataPtr->G,DataPtr->B);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CFXBaseAnim::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
switch(_thisThing->getThingType())
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
CPlayer *player = (CPlayer *) _thisThing;
|
||||
|
||||
if ( !player->isRecoveringFromHit() )
|
||||
{
|
||||
if ( DataPtr->Flags & FXANIM_FLAG_KILL_PLAYER )
|
||||
{
|
||||
player->takeDamage( DAMAGE__KILL_OUTRIGHT );
|
||||
}
|
||||
else if ( DataPtr->Flags & FXANIM_FLAG_INJURE_PLAYER )
|
||||
{
|
||||
player->takeDamage( DAMAGE__HIT_ENEMY );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue