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/tempmonster.cpp | |
| 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/tempmonster.cpp')
| -rw-r--r-- | mp/src/game/server/tempmonster.cpp | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/mp/src/game/server/tempmonster.cpp b/mp/src/game/server/tempmonster.cpp index 99676c3a..3100c55b 100644 --- a/mp/src/game/server/tempmonster.cpp +++ b/mp/src/game/server/tempmonster.cpp @@ -1,105 +1,105 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-//=========================================================
-// NPC template
-//=========================================================
-#include "cbase.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-#if 0
-
-//=========================================================
-// NPC's Anim Events Go Here
-//=========================================================
-
-class CMyNPC : public CAI_BaseNPC
-{
-public:
- DECLARE_CLASS( CMyNPC, CAI_BaseNPC );
-
- void Spawn( void );
- void Precache( void );
- void MaxYawSpeed( void );
- int Classify ( void );
- void HandleAnimEvent( animevent_t *pEvent );
-};
-LINK_ENTITY_TO_CLASS( my_NPC, CMyNPC );
-
-//=========================================================
-// Classify - indicates this NPC's place in the
-// relationship table.
-//=========================================================
-int CMyNPC::Classify ( void )
-{
- return CLASS_MY_NPC;
-}
-
-//=========================================================
-// SetYawSpeed - allows each sequence to have a different
-// turn rate associated with it.
-//=========================================================
-float CMyNPC::MaxYawSpeed ( void )
-{
- switch ( m_Activity )
- {
- case ACT_IDLE:
- default:
- return 90;
- }
-}
-
-//=========================================================
-// HandleAnimEvent - catches the NPC-specific messages
-// that occur when tagged animation frames are played.
-//=========================================================
-void CMyNPC::HandleAnimEvent( animevent_t *pEvent )
-{
- switch( pEvent->event )
- {
- case 0:
- default:
- CAI_BaseNPC::HandleAnimEvent( pEvent );
- break;
- }
-}
-
-//=========================================================
-// Spawn
-//=========================================================
-void CMyNPC::Spawn()
-{
- Precache( );
-
- engine.SetModel(edict(), "models/mymodel.mdl");
- UTIL_SetSize( this, Vector( -12, -12, 0 ), Vector( 12, 12, 24 ) );
-
- SetSolid( SOLID_SLIDEBOX );
- SetMoveType( MOVETYPE_STEP );
- m_bloodColor = BLOOD_COLOR_GREEN;
- m_iHealth = 8;
- m_vecViewOffset = Vector ( 0, 0, 0 );// position of the eyes relative to NPC's origin.
- m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
- m_NPCState = NPCSTATE_NONE;
-
- NPCInit();
-}
-
-//=========================================================
-// Precache - precaches all resources this NPC needs
-//=========================================================
-void CMyNPC::Precache()
-{
- engine.PrecacheModel("models/mymodel.mdl");
-}
-
-//=========================================================
-// AI Schedules Specific to this NPC
-//=========================================================
-#endif
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +//========================================================= +// NPC template +//========================================================= +#include "cbase.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +#if 0 + +//========================================================= +// NPC's Anim Events Go Here +//========================================================= + +class CMyNPC : public CAI_BaseNPC +{ +public: + DECLARE_CLASS( CMyNPC, CAI_BaseNPC ); + + void Spawn( void ); + void Precache( void ); + void MaxYawSpeed( void ); + int Classify ( void ); + void HandleAnimEvent( animevent_t *pEvent ); +}; +LINK_ENTITY_TO_CLASS( my_NPC, CMyNPC ); + +//========================================================= +// Classify - indicates this NPC's place in the +// relationship table. +//========================================================= +int CMyNPC::Classify ( void ) +{ + return CLASS_MY_NPC; +} + +//========================================================= +// SetYawSpeed - allows each sequence to have a different +// turn rate associated with it. +//========================================================= +float CMyNPC::MaxYawSpeed ( void ) +{ + switch ( m_Activity ) + { + case ACT_IDLE: + default: + return 90; + } +} + +//========================================================= +// HandleAnimEvent - catches the NPC-specific messages +// that occur when tagged animation frames are played. +//========================================================= +void CMyNPC::HandleAnimEvent( animevent_t *pEvent ) +{ + switch( pEvent->event ) + { + case 0: + default: + CAI_BaseNPC::HandleAnimEvent( pEvent ); + break; + } +} + +//========================================================= +// Spawn +//========================================================= +void CMyNPC::Spawn() +{ + Precache( ); + + engine.SetModel(edict(), "models/mymodel.mdl"); + UTIL_SetSize( this, Vector( -12, -12, 0 ), Vector( 12, 12, 24 ) ); + + SetSolid( SOLID_SLIDEBOX ); + SetMoveType( MOVETYPE_STEP ); + m_bloodColor = BLOOD_COLOR_GREEN; + m_iHealth = 8; + m_vecViewOffset = Vector ( 0, 0, 0 );// position of the eyes relative to NPC's origin. + m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result ) + m_NPCState = NPCSTATE_NONE; + + NPCInit(); +} + +//========================================================= +// Precache - precaches all resources this NPC needs +//========================================================= +void CMyNPC::Precache() +{ + engine.PrecacheModel("models/mymodel.mdl"); +} + +//========================================================= +// AI Schedules Specific to this NPC +//========================================================= +#endif |