summaryrefslogtreecommitdiff
path: root/game/server/hl1/hl1_npc_bloater.cpp
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_bloater.cpp
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_bloater.cpp')
-rw-r--r--game/server/hl1/hl1_npc_bloater.cpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/game/server/hl1/hl1_npc_bloater.cpp b/game/server/hl1/hl1_npc_bloater.cpp
new file mode 100644
index 0000000..b5c57c9
--- /dev/null
+++ b/game/server/hl1/hl1_npc_bloater.cpp
@@ -0,0 +1,86 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#include "cbase.h"
+#include "ai_default.h"
+#include "ai_task.h"
+#include "ai_schedule.h"
+#include "ai_node.h"
+#include "ai_hull.h"
+#include "ai_hint.h"
+#include "ai_memory.h"
+#include "ai_route.h"
+#include "ai_motor.h"
+#include "soundent.h"
+#include "game.h"
+#include "npcevent.h"
+#include "entitylist.h"
+#include "activitylist.h"
+#include "animation.h"
+#include "basecombatweapon.h"
+#include "IEffects.h"
+#include "vstdlib/random.h"
+#include "engine/IEngineSound.h"
+#include "ammodef.h"
+#include "hl1_ai_basenpc.h"
+
+class CNPC_Bloater : public CHL1BaseNPC
+{
+ DECLARE_CLASS( CNPC_Bloater, CHL1BaseNPC );
+public:
+
+ void Spawn( void );
+ void Precache( void );
+ /*void SetYawSpeed( void );
+ int Classify ( void );
+ void HandleAnimEvent( MonsterEvent_t *pEvent );
+
+ void PainSound( const CTakeDamageInfo &info );
+ void AlertSound( void );
+ void IdleSound( void );
+ void AttackSnd( void );
+
+ // No range attacks
+ BOOL CheckRangeAttack1 ( float flDot, float flDist ) { return FALSE; }
+ BOOL CheckRangeAttack2 ( float flDot, float flDist ) { return FALSE; }
+ int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );*/
+};
+
+LINK_ENTITY_TO_CLASS( monster_bloater, CNPC_Bloater );
+
+//=========================================================
+// Spawn
+//=========================================================
+void CNPC_Bloater::Spawn()
+{
+ Precache( );
+
+ SetModel( "models/floater.mdl");
+// UTIL_SetSize( this, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );
+
+ SetSolid( SOLID_BBOX );
+ AddSolidFlags( FSOLID_NOT_STANDABLE );
+ SetMoveType( MOVETYPE_FLY );
+ m_spawnflags |= FL_FLY;
+ m_bloodColor = BLOOD_COLOR_GREEN;
+ m_iHealth = 40;
+// pev->view_ofs = VEC_VIEW;// position of the eyes relative to monster's origin.
+ m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
+ m_NPCState = NPC_STATE_NONE;
+
+ SetRenderColor( 255, 255, 255, 255 );
+
+ NPCInit();
+}
+
+//=========================================================
+// Precache - precaches all resources this monster needs
+//=========================================================
+void CNPC_Bloater::Precache()
+{
+ PrecacheModel("models/floater.mdl");
+}