aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/hl2/npc_gman.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/server/hl2/npc_gman.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/server/hl2/npc_gman.cpp')
-rw-r--r--sp/src/game/server/hl2/npc_gman.cpp328
1 files changed, 164 insertions, 164 deletions
diff --git a/sp/src/game/server/hl2/npc_gman.cpp b/sp/src/game/server/hl2/npc_gman.cpp
index cb71a56b..a13fd083 100644
--- a/sp/src/game/server/hl2/npc_gman.cpp
+++ b/sp/src/game/server/hl2/npc_gman.cpp
@@ -1,164 +1,164 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: The G-Man, misunderstood servant of the people
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-
-
-//-----------------------------------------------------------------------------
-// Generic NPC - purely for scripted sequence work.
-//-----------------------------------------------------------------------------
-#include "cbase.h"
-#include "npcevent.h"
-#include "ai_basenpc.h"
-#include "ai_hull.h"
-#include "ai_behavior_follow.h"
-#include "ai_playerally.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-//-----------------------------------------------------------------------------
-// NPC's Anim Events Go Here
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-class CNPC_GMan : public CAI_PlayerAlly
-{
-public:
- DECLARE_CLASS( CNPC_GMan, CAI_PlayerAlly );
- DECLARE_DATADESC();
-
- void Spawn( void );
- void Precache( void );
- Class_T Classify ( void );
- void HandleAnimEvent( animevent_t *pEvent );
- virtual Disposition_t IRelationType(CBaseEntity *pTarget);
- int GetSoundInterests ( void );
- bool CreateBehaviors( void );
- int SelectSchedule( void );
-
-private:
- CAI_FollowBehavior m_FollowBehavior;
-};
-
-LINK_ENTITY_TO_CLASS( npc_gman, CNPC_GMan );
-
-BEGIN_DATADESC( CNPC_GMan )
-// (auto saved by AI)
-// DEFINE_FIELD( m_FollowBehavior, FIELD_EMBEDDED ), (auto saved by AI)
-END_DATADESC()
-
-//-----------------------------------------------------------------------------
-// Classify - indicates this NPC's place in the
-// relationship table.
-//-----------------------------------------------------------------------------
-Class_T CNPC_GMan::Classify ( void )
-{
- return CLASS_PLAYER_ALLY_VITAL;
-}
-
-
-
-//-----------------------------------------------------------------------------
-// HandleAnimEvent - catches the NPC-specific messages
-// that occur when tagged animation frames are played.
-//-----------------------------------------------------------------------------
-void CNPC_GMan::HandleAnimEvent( animevent_t *pEvent )
-{
- switch( pEvent->event )
- {
- case 1:
- default:
- BaseClass::HandleAnimEvent( pEvent );
- break;
- }
-}
-
-//-----------------------------------------------------------------------------
-// GetSoundInterests - generic NPC can't hear.
-//-----------------------------------------------------------------------------
-int CNPC_GMan::GetSoundInterests ( void )
-{
- return NULL;
-}
-
-
-//-----------------------------------------------------------------------------
-// Spawn
-//-----------------------------------------------------------------------------
-void CNPC_GMan::Spawn()
-{
- Precache();
-
- BaseClass::Spawn();
-
- SetModel( "models/gman.mdl" );
-
- SetHullType(HULL_HUMAN);
- SetHullSizeNormal();
-
- SetSolid( SOLID_BBOX );
- AddSolidFlags( FSOLID_NOT_STANDABLE );
- SetMoveType( MOVETYPE_STEP );
- SetBloodColor( BLOOD_COLOR_RED );
- m_iHealth = 8;
- m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
- m_NPCState = NPC_STATE_NONE;
- SetImpactEnergyScale( 0.0f ); // no physics damage on the gman
-
- CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
- CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
- AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL );
-
- NPCInit();
-}
-
-//-----------------------------------------------------------------------------
-// Precache - precaches all resources this NPC needs
-//-----------------------------------------------------------------------------
-void CNPC_GMan::Precache()
-{
- PrecacheModel( "models/gman.mdl" );
-
- BaseClass::Precache();
-}
-
-//-----------------------------------------------------------------------------
-// The G-Man isn't scared of anything.
-//-----------------------------------------------------------------------------
-Disposition_t CNPC_GMan::IRelationType(CBaseEntity *pTarget)
-{
- return D_NU;
-}
-
-
-//=========================================================
-// Purpose:
-//=========================================================
-bool CNPC_GMan::CreateBehaviors()
-{
- AddBehavior( &m_FollowBehavior );
-
- return BaseClass::CreateBehaviors();
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-int CNPC_GMan::SelectSchedule( void )
-{
- if ( !BehaviorSelectSchedule() )
- {
- }
-
- return BaseClass::SelectSchedule();
-}
-
-//-----------------------------------------------------------------------------
-// AI Schedules Specific to this NPC
-//-----------------------------------------------------------------------------
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: The G-Man, misunderstood servant of the people
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+
+
+//-----------------------------------------------------------------------------
+// Generic NPC - purely for scripted sequence work.
+//-----------------------------------------------------------------------------
+#include "cbase.h"
+#include "npcevent.h"
+#include "ai_basenpc.h"
+#include "ai_hull.h"
+#include "ai_behavior_follow.h"
+#include "ai_playerally.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+//-----------------------------------------------------------------------------
+// NPC's Anim Events Go Here
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+class CNPC_GMan : public CAI_PlayerAlly
+{
+public:
+ DECLARE_CLASS( CNPC_GMan, CAI_PlayerAlly );
+ DECLARE_DATADESC();
+
+ void Spawn( void );
+ void Precache( void );
+ Class_T Classify ( void );
+ void HandleAnimEvent( animevent_t *pEvent );
+ virtual Disposition_t IRelationType(CBaseEntity *pTarget);
+ int GetSoundInterests ( void );
+ bool CreateBehaviors( void );
+ int SelectSchedule( void );
+
+private:
+ CAI_FollowBehavior m_FollowBehavior;
+};
+
+LINK_ENTITY_TO_CLASS( npc_gman, CNPC_GMan );
+
+BEGIN_DATADESC( CNPC_GMan )
+// (auto saved by AI)
+// DEFINE_FIELD( m_FollowBehavior, FIELD_EMBEDDED ), (auto saved by AI)
+END_DATADESC()
+
+//-----------------------------------------------------------------------------
+// Classify - indicates this NPC's place in the
+// relationship table.
+//-----------------------------------------------------------------------------
+Class_T CNPC_GMan::Classify ( void )
+{
+ return CLASS_PLAYER_ALLY_VITAL;
+}
+
+
+
+//-----------------------------------------------------------------------------
+// HandleAnimEvent - catches the NPC-specific messages
+// that occur when tagged animation frames are played.
+//-----------------------------------------------------------------------------
+void CNPC_GMan::HandleAnimEvent( animevent_t *pEvent )
+{
+ switch( pEvent->event )
+ {
+ case 1:
+ default:
+ BaseClass::HandleAnimEvent( pEvent );
+ break;
+ }
+}
+
+//-----------------------------------------------------------------------------
+// GetSoundInterests - generic NPC can't hear.
+//-----------------------------------------------------------------------------
+int CNPC_GMan::GetSoundInterests ( void )
+{
+ return NULL;
+}
+
+
+//-----------------------------------------------------------------------------
+// Spawn
+//-----------------------------------------------------------------------------
+void CNPC_GMan::Spawn()
+{
+ Precache();
+
+ BaseClass::Spawn();
+
+ SetModel( "models/gman.mdl" );
+
+ SetHullType(HULL_HUMAN);
+ SetHullSizeNormal();
+
+ SetSolid( SOLID_BBOX );
+ AddSolidFlags( FSOLID_NOT_STANDABLE );
+ SetMoveType( MOVETYPE_STEP );
+ SetBloodColor( BLOOD_COLOR_RED );
+ m_iHealth = 8;
+ m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
+ m_NPCState = NPC_STATE_NONE;
+ SetImpactEnergyScale( 0.0f ); // no physics damage on the gman
+
+ CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
+ CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
+ AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL );
+
+ NPCInit();
+}
+
+//-----------------------------------------------------------------------------
+// Precache - precaches all resources this NPC needs
+//-----------------------------------------------------------------------------
+void CNPC_GMan::Precache()
+{
+ PrecacheModel( "models/gman.mdl" );
+
+ BaseClass::Precache();
+}
+
+//-----------------------------------------------------------------------------
+// The G-Man isn't scared of anything.
+//-----------------------------------------------------------------------------
+Disposition_t CNPC_GMan::IRelationType(CBaseEntity *pTarget)
+{
+ return D_NU;
+}
+
+
+//=========================================================
+// Purpose:
+//=========================================================
+bool CNPC_GMan::CreateBehaviors()
+{
+ AddBehavior( &m_FollowBehavior );
+
+ return BaseClass::CreateBehaviors();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+int CNPC_GMan::SelectSchedule( void )
+{
+ if ( !BehaviorSelectSchedule() )
+ {
+ }
+
+ return BaseClass::SelectSchedule();
+}
+
+//-----------------------------------------------------------------------------
+// AI Schedules Specific to this NPC
+//-----------------------------------------------------------------------------