summaryrefslogtreecommitdiff
path: root/game/server/hl1/hl1_npc_ichthyosaur.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/hl1/hl1_npc_ichthyosaur.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/hl1/hl1_npc_ichthyosaur.h')
-rw-r--r--game/server/hl1/hl1_npc_ichthyosaur.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/game/server/hl1/hl1_npc_ichthyosaur.h b/game/server/hl1/hl1_npc_ichthyosaur.h
new file mode 100644
index 0000000..0f05c4d
--- /dev/null
+++ b/game/server/hl1/hl1_npc_ichthyosaur.h
@@ -0,0 +1,97 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#ifndef NPC_ICHTHYOSAUR_H
+#define NPC_ICHTHYOSAUR_H
+
+
+#include "hl1_ai_basenpc.h"
+
+#define SEARCH_RETRY 16
+
+#define ICHTHYOSAUR_SPEED 150
+
+#define EYE_MAD 0
+#define EYE_BASE 1
+#define EYE_CLOSED 2
+#define EYE_BACK 3
+#define EYE_LOOK 4
+
+
+//
+// CNPC_Ichthyosaur
+//
+
+class CNPC_Ichthyosaur : public CHL1BaseNPC
+{
+ DECLARE_CLASS( CNPC_Ichthyosaur, CHL1BaseNPC );
+public:
+
+ void Precache( void );
+ void Spawn( void );
+ Class_T Classify ( void );
+ void NPCThink ( void );
+ void Swim ( void );
+ void StartTask(const Task_t *pTask);
+ void RunTask( const Task_t *pTask );
+ int RangeAttack1Conditions( float flDot, float flDist );
+ int MeleeAttack1Conditions ( float flDot, float flDist );
+ void BiteTouch( CBaseEntity *pOther );
+ void HandleAnimEvent( animevent_t *pEvent );
+ int TranslateSchedule( int scheduleType );
+ int SelectSchedule();
+ virtual bool FVisible ( CBaseEntity *pEntity, int traceMask = MASK_BLOCKLOS, CBaseEntity **ppBlocker = NULL );
+
+ Vector DoProbe( const Vector &Probe );
+ bool ProbeZ( const Vector &position, const Vector &probe, float *pFraction);
+
+ float GetGroundSpeed ( void );
+
+ bool OverrideMove( float flInterval );
+ void MoveExecute_Alive(float flInterval);
+
+ void InputStartCombat( inputdata_t &input );
+ void InputEndCombat( inputdata_t &input );
+
+ virtual void IdleSound( void );
+ virtual void AlertSound( void );
+ virtual void DeathSound( const CTakeDamageInfo &info );
+ virtual void PainSound( const CTakeDamageInfo &info );
+
+ void AttackSound( void );
+ void BiteSound( void );
+
+ virtual void GatherEnemyConditions( CBaseEntity *pEnemy );
+
+ DEFINE_CUSTOM_AI;
+ DECLARE_DATADESC();
+
+private:
+ Vector m_SaveVelocity;
+ float m_idealDist;
+
+ float m_flBlink;
+
+ float m_flEnemyTouched;
+ bool m_bOnAttack;
+
+ float m_flMaxSpeed;
+ float m_flMinSpeed;
+ float m_flMaxDist;
+
+ float m_flNextAlert;
+ float m_flLastAttackSound;
+
+ //Save the info from that run
+ Vector m_vecLastMoveTarget;
+ bool m_bHasMoveTarget;
+
+ float m_flFlyingSpeed;
+};
+
+
+#endif //NPC_ICHTHYOSAUR_H