2016-03-01 15:47:10 +00:00
|
|
|
#ifndef __P_ENEMY_H__
|
|
|
|
#define __P_ENEMY_H__
|
|
|
|
|
2016-11-17 12:10:19 +00:00
|
|
|
#include "dobject.h"
|
2016-10-12 17:22:33 +00:00
|
|
|
#include "vectors.h"
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
struct sector_t;
|
|
|
|
class AActor;
|
|
|
|
class AInventory;
|
|
|
|
class PClass;
|
|
|
|
|
|
|
|
|
|
|
|
enum dirtype_t
|
|
|
|
{
|
|
|
|
DI_EAST,
|
|
|
|
DI_NORTHEAST,
|
|
|
|
DI_NORTH,
|
|
|
|
DI_NORTHWEST,
|
|
|
|
DI_WEST,
|
|
|
|
DI_SOUTHWEST,
|
|
|
|
DI_SOUTH,
|
|
|
|
DI_SOUTHEAST,
|
|
|
|
DI_NODIR,
|
|
|
|
NUMDIRS
|
|
|
|
};
|
|
|
|
|
2016-03-25 23:34:56 +00:00
|
|
|
extern double xspeed[8], yspeed[8];
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
enum LO_Flags
|
|
|
|
{
|
|
|
|
LOF_NOSIGHTCHECK = 1,
|
|
|
|
LOF_NOSOUNDCHECK = 2,
|
|
|
|
LOF_DONTCHASEGOAL = 4,
|
|
|
|
LOF_NOSEESOUND = 8,
|
|
|
|
LOF_FULLVOLSEESOUND = 16,
|
|
|
|
LOF_NOJUMP = 32,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FLookExParams
|
|
|
|
{
|
2016-03-25 11:57:22 +00:00
|
|
|
DAngle Fov;
|
|
|
|
double minDist;
|
|
|
|
double maxDist;
|
|
|
|
double maxHeardist;
|
2016-03-01 15:47:10 +00:00
|
|
|
int flags;
|
|
|
|
FState *seestate;
|
|
|
|
};
|
|
|
|
|
|
|
|
void P_DaggerAlert (AActor *target, AActor *emitter);
|
|
|
|
bool P_HitFriend (AActor *self);
|
2016-03-26 19:59:35 +00:00
|
|
|
void P_NoiseAlert (AActor *target, AActor *emmiter, bool splash=false, double maxdist=0);
|
2016-03-22 11:42:27 +00:00
|
|
|
|
2016-03-01 15:47:10 +00:00
|
|
|
bool P_CheckMeleeRange2 (AActor *actor);
|
|
|
|
bool P_Move (AActor *actor);
|
|
|
|
bool P_TryWalk (AActor *actor);
|
|
|
|
void P_NewChaseDir (AActor *actor);
|
|
|
|
AInventory *P_DropItem (AActor *source, PClassActor *type, int special, int chance);
|
|
|
|
void P_TossItem (AActor *item);
|
|
|
|
bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params);
|
2016-03-21 13:00:05 +00:00
|
|
|
void A_Weave(AActor *self, int xyspeed, int zspeed, double xydist, double zdist);
|
2016-03-01 15:47:10 +00:00
|
|
|
void A_Unblock(AActor *self, bool drop);
|
|
|
|
|
|
|
|
void A_BossDeath(AActor *self);
|
2016-02-05 02:17:46 +00:00
|
|
|
|
|
|
|
void A_Wander(AActor *self, int flags = 0);
|
2016-11-30 16:15:01 +00:00
|
|
|
void A_Chase(AActor *self);
|
2016-03-01 15:47:10 +00:00
|
|
|
void A_FaceTarget(AActor *actor);
|
2016-03-25 11:57:22 +00:00
|
|
|
void A_Face(AActor *self, AActor *other, DAngle max_turn = 0., DAngle max_pitch = 270., DAngle ang_offset = 0., DAngle pitch_offset = 0., int flags = 0, double z_add = 0);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
bool CheckBossDeath (AActor *);
|
|
|
|
int P_Massacre ();
|
|
|
|
bool P_CheckMissileRange (AActor *actor);
|
|
|
|
|
2016-03-19 23:54:18 +00:00
|
|
|
#define SKULLSPEED (20.)
|
|
|
|
void A_SkullAttack(AActor *self, double speed);
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
#endif //__P_ENEMY_H__
|