blob: 62218b8de7761b8e76015113ac2af7cf9bc85b5c (
plain) (
blame)
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
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Base combat character with no AI
//
// $Workfile: $
// $Date: $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//
#ifndef NPC_BULLSQUID_H
#define NPC_BULLSQUID_H
#include "ai_basenpc.h"
class CNPC_Bullsquid : public CAI_BaseNPC
{
DECLARE_CLASS( CNPC_Bullsquid, CAI_BaseNPC );
DECLARE_DATADESC();
public:
void Spawn( void );
void Precache( void );
Class_T Classify( void );
void IdleSound( void );
void PainSound( const CTakeDamageInfo &info );
void AlertSound( void );
void DeathSound( const CTakeDamageInfo &info );
void AttackSound( void );
void GrowlSound( void );
float MaxYawSpeed ( void );
void HandleAnimEvent( animevent_t *pEvent );
int RangeAttack1Conditions( float flDot, float flDist );
int MeleeAttack1Conditions( float flDot, float flDist );
int MeleeAttack2Conditions( float flDot, float flDist );
bool FValidateHintType ( CAI_Hint *pHint );
void RemoveIgnoredConditions( void );
Disposition_t IRelationType( CBaseEntity *pTarget );
int OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo );
int GetSoundInterests ( void );
void RunAI ( void );
virtual void OnListened ( void );
int SelectSchedule( void );
bool FInViewCone ( Vector pOrigin );
void StartTask ( const Task_t *pTask );
void RunTask ( const Task_t *pTask );
NPC_STATE SelectIdealState ( void );
DEFINE_CUSTOM_AI;
private:
bool m_fCanThreatDisplay;// this is so the squid only does the "I see a headcrab!" dance one time.
float m_flLastHurtTime;// we keep track of this, because if something hurts a squid, it will forget about its love of headcrabs for a while.
float m_flNextSpitTime;// last time the bullsquid used the spit attack.
int m_nSquidSpitSprite;
float m_flHungryTime;// set this is a future time to stop the monster from eating for a while.
float m_nextSquidSoundTime;
};
#endif // NPC_BULLSQUID_H
|