diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/server/hl2/npc_stalker.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/server/hl2/npc_stalker.h')
| -rw-r--r-- | sp/src/game/server/hl2/npc_stalker.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/sp/src/game/server/hl2/npc_stalker.h b/sp/src/game/server/hl2/npc_stalker.h new file mode 100644 index 00000000..176c8e3a --- /dev/null +++ b/sp/src/game/server/hl2/npc_stalker.h @@ -0,0 +1,115 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef NPC_STALKER_H
+#define NPC_STALKER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "ai_basenpc.h"
+#include "entityoutput.h"
+#include "ai_behavior.h"
+#include "ai_behavior_actbusy.h"
+
+class CBeam;
+class CSprite;
+class CScriptedTarget;
+
+typedef CAI_BehaviorHost<CAI_BaseNPC> CAI_BaseStalker;
+
+class CNPC_Stalker : public CAI_BaseStalker
+{
+ DECLARE_CLASS( CNPC_Stalker, CAI_BaseStalker );
+
+public:
+ float m_flNextAttackSoundTime;
+ float m_flNextBreatheSoundTime;
+ float m_flNextScrambleSoundTime;
+ float m_flNextNPCThink;
+
+ // ------------------------------
+ // Laser Beam
+ // ------------------------------
+ int m_eBeamPower;
+ Vector m_vLaserDir;
+ Vector m_vLaserTargetPos;
+ float m_fBeamEndTime;
+ float m_fBeamRechargeTime;
+ float m_fNextDamageTime;
+ float m_nextSmokeTime;
+ float m_bPlayingHitWall;
+ float m_bPlayingHitFlesh;
+ CBeam* m_pBeam;
+ CSprite* m_pLightGlow;
+ int m_iPlayerAggression;
+ float m_flNextScreamTime;
+
+ void KillAttackBeam(void);
+ void DrawAttackBeam(void);
+ void CalcBeamPosition(void);
+ Vector LaserStartPosition(Vector vStalkerPos);
+
+ Vector m_vLaserCurPos; // Last position successfully burned
+ bool InnateWeaponLOSCondition( const Vector &ownerPos, const Vector &targetPos, bool bSetConditions );
+
+ // ------------------------------
+ // Dormancy
+ // ------------------------------
+ CAI_Schedule* WakeUp(void);
+ void GoDormant(void);
+
+public:
+ void Spawn( void );
+ void Precache( void );
+ bool CreateBehaviors();
+ float MaxYawSpeed( void );
+ Class_T Classify ( void );
+
+ void PrescheduleThink();
+
+ bool IsValidEnemy( CBaseEntity *pEnemy );
+
+ void StartTask( const Task_t *pTask );
+ void RunTask( const Task_t *pTask );
+ virtual int SelectSchedule ( void );
+ virtual int TranslateSchedule( int scheduleType );
+ int OnTakeDamage_Alive( const CTakeDamageInfo &info );
+ void OnScheduleChange();
+
+ void StalkerThink(void);
+ void NotifyDeadFriend( CBaseEntity *pFriend );
+
+ int MeleeAttack1Conditions ( float flDot, float flDist );
+ int RangeAttack1Conditions ( float flDot, float flDist );
+ void HandleAnimEvent( animevent_t *pEvent );
+
+ bool FValidateHintType(CAI_Hint *pHint);
+ Activity GetHintActivity( short sHintType, Activity HintsActivity );
+ float GetHintDelay( short sHintType );
+
+ void IdleSound( void );
+ void DeathSound( const CTakeDamageInfo &info );
+ void PainSound( const CTakeDamageInfo &info );
+
+ void Event_Killed( const CTakeDamageInfo &info );
+ void DoSmokeEffect( const Vector &position );
+
+ void AddZigZagToPath(void);
+ void StartAttackBeam();
+ void UpdateAttackBeam();
+
+ CNPC_Stalker(void);
+
+ DECLARE_DATADESC();
+ DEFINE_CUSTOM_AI;
+
+private:
+ CAI_ActBusyBehavior m_ActBusyBehavior;
+};
+
+#endif // NPC_STALKER_H
|