diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/server/hl2/npc_turret_ground.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/server/hl2/npc_turret_ground.h')
| -rw-r--r-- | mp/src/game/server/hl2/npc_turret_ground.h | 220 |
1 files changed, 110 insertions, 110 deletions
diff --git a/mp/src/game/server/hl2/npc_turret_ground.h b/mp/src/game/server/hl2/npc_turret_ground.h index 858b6e74..97b1f4af 100644 --- a/mp/src/game/server/hl2/npc_turret_ground.h +++ b/mp/src/game/server/hl2/npc_turret_ground.h @@ -1,110 +1,110 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-#ifndef NPC_TURRET_GROUND_H
-#define NPC_TURRET_GROUND_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "ai_basenpc.h"
-#include "smoke_trail.h"
-
-//=========================================================
-//=========================================================
-class CNPC_GroundTurret : public CAI_BaseNPC
-{
-public:
- DECLARE_CLASS( CNPC_GroundTurret, CAI_BaseNPC );
- DECLARE_DATADESC();
-
- void Precache( void );
- virtual void Spawn( void );
- bool CreateVPhysics( void );
- void PrescheduleThink();
- Class_T Classify( void );
-
- void PostNPCInit();
-
- // Damage & Death
- virtual int OnTakeDamage_Alive( const CTakeDamageInfo &info );
- void Event_Killed( const CTakeDamageInfo &info );
- void DeathEffects();
- bool CanBecomeRagdoll( void ) { return false; }
- void DeathSound( const CTakeDamageInfo &info );
-
- // Combat
- void MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int iTracerType );
- Vector GetAttackSpread( CBaseCombatWeapon *pWeapon, CBaseEntity *pTarget )
- {
- return VECTOR_CONE_5DEGREES;
- }
-
-
- // Sensing
- void GatherConditions();
- Vector EyePosition();
- bool FVisible( CBaseEntity *pEntity, int traceMask, CBaseEntity **ppBlocker );
- bool QuerySeeEntity( CBaseEntity *pEntity, bool bOnlyHateOrFearIfNPC = false );
-
-
- bool IsOpeningOrClosing() { return (GetAbsVelocity().z != 0.0f); }
- bool IsEnabled();
- bool IsOpen();
-
- // Tasks & Schedules
- void StartTask( const Task_t *pTask );
- void RunTask( const Task_t *pTask );
- virtual int SelectSchedule( void );
- virtual int TranslateSchedule( int scheduleType );
-
- // Activities & Animation
- Activity NPC_TranslateActivity( Activity eNewActivity );
- virtual void Shoot();
- virtual void Scan();
- void ProjectBeam( const Vector &vecStart, const Vector &vecDir, int width, int brightness, float duration );
-
- // Local
- void SetActive( bool bActive ) {}
-
- // Inputs
- void InputEnable( inputdata_t &inputdata );
- void InputDisable( inputdata_t &inputdata );
-
- // Outputs
- COutputEvent m_OnAreaClear;
-
- DEFINE_CUSTOM_AI;
-
-protected:
- //-----------------------------------------------------
- // Conditions, Schedules, Tasks
- //-----------------------------------------------------
- enum
- {
- SCHED_GROUND_TURRET_IDLE = BaseClass::NEXT_SCHEDULE,
- SCHED_GROUND_TURRET_ATTACK,
-
- TASK_GROUNDTURRET_SCAN = BaseClass::NEXT_TASK,
- };
-
- int m_iAmmoType;
- SmokeTrail *m_pSmoke;
-
- bool m_bEnabled;
-
- float m_flTimeNextShoot;
- float m_flTimeLastSawEnemy;
- Vector m_vecSpread;
- bool m_bHasExploded;
- int m_iDeathSparks;
- float m_flSensingDist;
- bool m_bSeeEnemy;
- float m_flTimeNextPing;
-
- Vector m_vecClosedPos;
-
- Vector m_vecLightOffset;
-
- HSOUNDSCRIPTHANDLE m_ShotSounds;
-};
-
-#endif //#ifndef NPC_TURRET_GROUND_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +#ifndef NPC_TURRET_GROUND_H +#define NPC_TURRET_GROUND_H +#ifdef _WIN32 +#pragma once +#endif + +#include "ai_basenpc.h" +#include "smoke_trail.h" + +//========================================================= +//========================================================= +class CNPC_GroundTurret : public CAI_BaseNPC +{ +public: + DECLARE_CLASS( CNPC_GroundTurret, CAI_BaseNPC ); + DECLARE_DATADESC(); + + void Precache( void ); + virtual void Spawn( void ); + bool CreateVPhysics( void ); + void PrescheduleThink(); + Class_T Classify( void ); + + void PostNPCInit(); + + // Damage & Death + virtual int OnTakeDamage_Alive( const CTakeDamageInfo &info ); + void Event_Killed( const CTakeDamageInfo &info ); + void DeathEffects(); + bool CanBecomeRagdoll( void ) { return false; } + void DeathSound( const CTakeDamageInfo &info ); + + // Combat + void MakeTracer( const Vector &vecTracerSrc, const trace_t &tr, int iTracerType ); + Vector GetAttackSpread( CBaseCombatWeapon *pWeapon, CBaseEntity *pTarget ) + { + return VECTOR_CONE_5DEGREES; + } + + + // Sensing + void GatherConditions(); + Vector EyePosition(); + bool FVisible( CBaseEntity *pEntity, int traceMask, CBaseEntity **ppBlocker ); + bool QuerySeeEntity( CBaseEntity *pEntity, bool bOnlyHateOrFearIfNPC = false ); + + + bool IsOpeningOrClosing() { return (GetAbsVelocity().z != 0.0f); } + bool IsEnabled(); + bool IsOpen(); + + // Tasks & Schedules + void StartTask( const Task_t *pTask ); + void RunTask( const Task_t *pTask ); + virtual int SelectSchedule( void ); + virtual int TranslateSchedule( int scheduleType ); + + // Activities & Animation + Activity NPC_TranslateActivity( Activity eNewActivity ); + virtual void Shoot(); + virtual void Scan(); + void ProjectBeam( const Vector &vecStart, const Vector &vecDir, int width, int brightness, float duration ); + + // Local + void SetActive( bool bActive ) {} + + // Inputs + void InputEnable( inputdata_t &inputdata ); + void InputDisable( inputdata_t &inputdata ); + + // Outputs + COutputEvent m_OnAreaClear; + + DEFINE_CUSTOM_AI; + +protected: + //----------------------------------------------------- + // Conditions, Schedules, Tasks + //----------------------------------------------------- + enum + { + SCHED_GROUND_TURRET_IDLE = BaseClass::NEXT_SCHEDULE, + SCHED_GROUND_TURRET_ATTACK, + + TASK_GROUNDTURRET_SCAN = BaseClass::NEXT_TASK, + }; + + int m_iAmmoType; + SmokeTrail *m_pSmoke; + + bool m_bEnabled; + + float m_flTimeNextShoot; + float m_flTimeLastSawEnemy; + Vector m_vecSpread; + bool m_bHasExploded; + int m_iDeathSparks; + float m_flSensingDist; + bool m_bSeeEnemy; + float m_flTimeNextPing; + + Vector m_vecClosedPos; + + Vector m_vecLightOffset; + + HSOUNDSCRIPTHANDLE m_ShotSounds; +}; + +#endif //#ifndef NPC_TURRET_GROUND_H |