2006-02-24 04:48:15 +00:00
|
|
|
#ifndef __P_ENEMY_H__
|
|
|
|
#define __P_ENEMY_H__
|
|
|
|
|
2008-08-10 22:48:37 +00:00
|
|
|
#include "thingdef/thingdef.h"
|
2011-06-13 10:30:30 +00:00
|
|
|
#include "tables.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-09-15 14:11:05 +00:00
|
|
|
struct sector_t;
|
|
|
|
class AActor;
|
|
|
|
class AInventory;
|
|
|
|
struct PClass;
|
|
|
|
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
enum dirtype_t
|
|
|
|
{
|
|
|
|
DI_EAST,
|
|
|
|
DI_NORTHEAST,
|
|
|
|
DI_NORTH,
|
|
|
|
DI_NORTHWEST,
|
|
|
|
DI_WEST,
|
|
|
|
DI_SOUTHWEST,
|
|
|
|
DI_SOUTH,
|
|
|
|
DI_SOUTHEAST,
|
|
|
|
DI_NODIR,
|
|
|
|
NUMDIRS
|
|
|
|
};
|
|
|
|
|
|
|
|
extern fixed_t xspeed[8], yspeed[8];
|
|
|
|
|
2009-09-16 15:54:04 +00:00
|
|
|
enum LO_Flags
|
|
|
|
{
|
|
|
|
LOF_NOSIGHTCHECK = 1,
|
|
|
|
LOF_NOSOUNDCHECK = 2,
|
|
|
|
LOF_DONTCHASEGOAL = 4,
|
|
|
|
LOF_NOSEESOUND = 8,
|
|
|
|
LOF_FULLVOLSEESOUND = 16,
|
2010-08-28 20:22:35 +00:00
|
|
|
LOF_NOJUMP = 32,
|
2009-09-16 15:54:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FLookExParams
|
|
|
|
{
|
|
|
|
angle_t fov;
|
|
|
|
fixed_t mindist;
|
|
|
|
fixed_t maxdist;
|
|
|
|
fixed_t maxheardist;
|
|
|
|
int flags;
|
|
|
|
FState *seestate;
|
|
|
|
};
|
|
|
|
|
2010-06-13 09:06:12 +00:00
|
|
|
void P_DaggerAlert (AActor *target, AActor *emitter);
|
2011-06-13 10:30:30 +00:00
|
|
|
void P_RecursiveSound (sector_t *sec, AActor *soundtarget, bool splash, int soundblocks, AActor *emitter=NULL, fixed_t maxdist=0);
|
2006-02-24 04:48:15 +00:00
|
|
|
bool P_HitFriend (AActor *self);
|
2011-06-13 10:30:30 +00:00
|
|
|
void P_NoiseAlert (AActor *target, AActor *emmiter, bool splash=false, fixed_t maxdist=0);
|
2006-02-24 04:48:15 +00:00
|
|
|
bool P_CheckMeleeRange2 (AActor *actor);
|
2006-09-14 00:02:31 +00:00
|
|
|
bool P_Move (AActor *actor);
|
|
|
|
bool P_TryWalk (AActor *actor);
|
2006-02-24 04:48:15 +00:00
|
|
|
void P_NewChaseDir (AActor *actor);
|
2006-05-10 02:40:43 +00:00
|
|
|
AInventory *P_DropItem (AActor *source, const PClass *type, int special, int chance);
|
2006-02-24 04:48:15 +00:00
|
|
|
void P_TossItem (AActor *item);
|
2009-09-16 15:54:04 +00:00
|
|
|
bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params);
|
2009-12-25 11:09:56 +00:00
|
|
|
void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdist);
|
2010-04-23 08:12:47 +00:00
|
|
|
void A_Unblock(AActor *self, bool drop);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-08-10 22:48:37 +00:00
|
|
|
DECLARE_ACTION(A_Look)
|
|
|
|
DECLARE_ACTION(A_Wander)
|
|
|
|
DECLARE_ACTION(A_BossDeath)
|
|
|
|
DECLARE_ACTION(A_Pain)
|
|
|
|
DECLARE_ACTION(A_MonsterRail)
|
|
|
|
DECLARE_ACTION(A_NoBlocking)
|
|
|
|
DECLARE_ACTION(A_Scream)
|
|
|
|
DECLARE_ACTION(A_FreezeDeath)
|
|
|
|
DECLARE_ACTION(A_FreezeDeathChunks)
|
2009-03-03 21:17:00 +00:00
|
|
|
DECLARE_ACTION(A_BossDeath)
|
2008-08-10 22:48:37 +00:00
|
|
|
|
|
|
|
void A_Chase(AActor *self);
|
2010-05-12 07:02:23 +00:00
|
|
|
void A_FaceTarget (AActor *actor, angle_t max_turn = 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-08-10 11:29:19 +00:00
|
|
|
bool A_RaiseMobj (AActor *, fixed_t speed);
|
|
|
|
bool A_SinkMobj (AActor *, fixed_t speed);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
bool CheckBossDeath (AActor *);
|
|
|
|
int P_Massacre ();
|
2006-09-14 00:02:31 +00:00
|
|
|
bool P_CheckMissileRange (AActor *actor);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-11-27 13:23:02 +00:00
|
|
|
#define SKULLSPEED (20*FRACUNIT)
|
|
|
|
void A_SkullAttack(AActor *self, fixed_t speed);
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
#endif //__P_ENEMY_H__
|