aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/hl2/npc_bullseye.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/server/hl2/npc_bullseye.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/server/hl2/npc_bullseye.h')
-rw-r--r--mp/src/game/server/hl2/npc_bullseye.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/mp/src/game/server/hl2/npc_bullseye.h b/mp/src/game/server/hl2/npc_bullseye.h
new file mode 100644
index 00000000..ccd4e1f3
--- /dev/null
+++ b/mp/src/game/server/hl2/npc_bullseye.h
@@ -0,0 +1,79 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef NPC_BULLSEYE_H
+#define NPC_BULLSEYE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "ai_basenpc.h"
+
+//=========================================================
+// >> CBullseye
+//=========================================================
+class CNPC_Bullseye : public CAI_BaseNPC
+{
+ DECLARE_CLASS( CNPC_Bullseye, CAI_BaseNPC );
+
+public:
+ CNPC_Bullseye(void);
+ ~CNPC_Bullseye();
+
+ virtual void Precache( void );
+ virtual void Spawn( void );
+ virtual void Activate( void );
+ virtual void OnRestore( void );
+
+ virtual float GetAutoAimRadius() { return m_fAutoaimRadius; }
+
+ Class_T Classify( void );
+ void Event_Killed( const CTakeDamageInfo &info );
+ void DecalTrace( trace_t *pTrace, char const *decalName );
+ void ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCustomImpactName );
+ bool IsLightDamage( const CTakeDamageInfo &info );
+ void TraceAttack( const CTakeDamageInfo &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator );
+ int OnTakeDamage( const CTakeDamageInfo &info );
+ bool UsePerfectAccuracy( void ) { return m_bPerfectAccuracy; }
+
+ bool TestHitboxes( const Ray_t &ray, unsigned int fContentsMask, trace_t& tr ) { return false; } // force traces to test against hull
+
+ void BullseyeThink( void );
+ bool CanBecomeRagdoll( void );
+
+ void SetPainPartner( CBaseEntity *pOther );
+ void InputTargeted( inputdata_t &inputdata );
+ void InputReleased( inputdata_t &inputdata );
+ bool CanBecomeServerRagdoll( void ) { return false; }
+
+ bool CanBeAnEnemyOf( CBaseEntity *pEnemy );
+
+
+protected:
+
+ EHANDLE m_hPainPartner; //Entity that the bullseye will pass any damage it take to
+ COutputEvent m_OnTargeted;
+ COutputEvent m_OnReleased;
+ bool m_bPerfectAccuracy; // Entities that shoot at me should be perfectly accurate
+ float m_fAutoaimRadius; // How much to influence player's autoaim.
+ float m_flMinDistValidEnemy;
+
+ DECLARE_DATADESC();
+};
+
+int FindBullseyesInCone( CBaseEntity **pList, int listMax, const Vector &coneOrigin, const Vector &coneAxis, float coneAngleCos, float coneLength );
+
+#define SF_BULLSEYE_NONSOLID (1 << 16)
+#define SF_BULLSEYE_NODAMAGE (1 << 17)
+#define SF_BULLSEYE_ENEMYDAMAGEONLY (1 << 18)
+#define SF_BULLSEYE_BLEED (1 << 19)
+#define SF_BULLSEYE_PERFECTACC (1 << 20)
+#define SF_BULLSEYE_VPHYSICSSHADOW (1 << 21)
+
+
+#endif // NPC_BULLSEYE_H
+