diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/server/ai_looktarget.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/server/ai_looktarget.h')
| -rw-r--r-- | mp/src/game/server/ai_looktarget.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/mp/src/game/server/ai_looktarget.h b/mp/src/game/server/ai_looktarget.h new file mode 100644 index 00000000..60d0d241 --- /dev/null +++ b/mp/src/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 |