-
Notifications
You must be signed in to change notification settings - Fork 0
/
barney.h
105 lines (84 loc) · 2.61 KB
/
barney.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef SERVER_HUMAN_BARNEY_H
#define SERVER_HUMAN_BARNEY_H
//=========================================================
// Monster's Anim Events Go Here
//=========================================================
// first flag is barney dying for scripted sequences?
#define BARNEY_AE_DRAW (2)
#define BARNEY_AE_SHOOT (3)
#define BARNEY_AE_HOLSTER (4)
#define BARNEY_AE_RELOAD (5)
#define BARNEY_AE_RELOAD_FINISHED (6)
#define BARNEY_BODY_GUNHOLSTERED 0
#define BARNEY_BODY_GUNDRAWN 1
#define BARNEY_BODY_GUNGONE 2
#define REBECCA_AE_DRAW_DEAGLE (7)
#define REBECCA_BODY_GUN_DEAGLE 1
#define REBECCA_BODY_GUN_GLOCK 2
#define REBECCA_BODY_GUN_NONE 3
#define BODY_GROUP 0
#define HEAD_GROUP 1
#define GUN_GROUP 2
//=========================================================
// monster-specific schedule types
//=========================================================
enum
{
SCHED_POLICE_RELOAD = LAST_COMMON_SCHEDULE + 1,
};
enum BarneySay
{
BARNSAY_ATTACK,
BARNSAY_KILL,
BARNSAY_POK,
BARNSAY_PAIN,
BARNSAY_DIE,
BARNSAY_SHOT,
BARNSAY_MAD,
BARNSAY_GRENADE,
BARNSAY_CANTSEE,
BARNSAY_SMOKED
};
class CBarney : public CTalkMonster
{
public:
void Spawn() override;
void Precache() override;
void SetYawSpeed() override;
int ISoundMask() override;
virtual void BarneyFirePistol();
void AlertSound();
int Classify() override;
void CheckAmmo() override;
void HandleAnimEvent(MonsterEvent_t* pEvent) override;
void RunTask(Task_t* pTask) override;
void StartTask(Task_t* pTask) override;
int ObjectCaps() override { return CTalkMonster::ObjectCaps() | FCAP_IMPULSE_USE; }
bool TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, float flDamage, int bitsDamageType);
bool CheckRangeAttack1(float flDot, float flDist) override;
void DeclineFollowing() override;
virtual void OnSentenceSay( BarneySay say );
void OnNPCCoughing() override;
void OnNPCFlashed() override;
// Override these to set behavior
Schedule_t* GetScheduleOfType(int Type) override;
Schedule_t* GetSchedule() override;
MONSTERSTATE GetIdealState() override;
void DeathSound();
void PainSound();
void TalkInit();
void TraceAttack(entvars_t* pevAttacker, float flDamage, Vector vecDir, TraceResult* ptr, int bitsDamageType) override;
void Killed(entvars_t* pevAttacker, int iGib);
bool Save(CSave& save) override;
bool Restore(CRestore& restore) override;
static TYPEDESCRIPTION m_SaveData[];
bool m_fGunDrawn;
float m_painTime;
float m_checkAttackTime;
bool m_lastAttackCheck;
int m_GrenadeState;
// UNDONE: What is this for? It isn't used?
float m_flPlayerDamage; // how much pain has the player inflicted on me?
CUSTOM_SCHEDULES;
};
#endif