summaryrefslogtreecommitdiff
path: root/game/server/ai_looktarget.h
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/ai_looktarget.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/ai_looktarget.h')
-rw-r--r--game/server/ai_looktarget.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/game/server/ai_looktarget.h b/game/server/ai_looktarget.h
new file mode 100644
index 0000000..a98ceb0
--- /dev/null
+++ b/game/server/ai_looktarget.h
@@ -0,0 +1,47 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+#pragma once
+#ifndef AI_LOOKTARGET_H
+#define AI_LOOKTARGET_H
+
+#define SF_LOOKTARGET_ONLYONCE 0x00000001
+
+//=============================================================================
+//=============================================================================
+class CAI_LookTarget : public CPointEntity
+{
+public:
+ DECLARE_CLASS( CAI_LookTarget, CPointEntity );
+ DECLARE_DATADESC();
+
+ CAI_LookTarget() { m_flTimeNextAvailable = -1; }
+
+ // Debugging
+ int DrawDebugTextOverlays(void);
+
+ // Accessors & Availability
+ bool IsEligible( CBaseEntity *pLooker );
+ bool IsEnabled() { return !m_bDisabled; }
+ bool IsAvailable() { return (gpGlobals->curtime > m_flTimeNextAvailable); }
+ void Reserve( float flDuration );
+
+ // Searching
+ static CAI_LookTarget *GetFirstLookTarget();
+ static CAI_LookTarget *GetNextLookTarget( CAI_LookTarget *pCurrentTarget );
+
+ int m_iContext;
+ int m_iPriority;
+
+ void Enable() { m_bDisabled = false; }
+ void Disable() { m_bDisabled = true; }
+
+private:
+ bool m_bDisabled;
+ float m_flTimeNextAvailable;
+ float m_flMaxDist;
+};
+
+#endif//AI_LOOKTARGET_H \ No newline at end of file