diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tf/bot/tf_bot_vision.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf/bot/tf_bot_vision.h')
| -rw-r--r-- | game/server/tf/bot/tf_bot_vision.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/game/server/tf/bot/tf_bot_vision.h b/game/server/tf/bot/tf_bot_vision.h new file mode 100644 index 0000000..7f999e5 --- /dev/null +++ b/game/server/tf/bot/tf_bot_vision.h @@ -0,0 +1,44 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// tf_bot_vision.h +// Team Fortress NextBot vision interface +// Michael Booth, May 2009 + +#ifndef TF_BOT_VISION_H +#define TF_BOT_VISION_H + +#include "NextBotVisionInterface.h" + +//---------------------------------------------------------------------------- +class CTFBotVision : public IVision +{ +public: + CTFBotVision( INextBot *bot ) : IVision( bot ) + { + } + + virtual ~CTFBotVision() { } + + virtual void Update( void ); // update internal state + + /** + * Populate "potentiallyVisible" with the set of all entities we could potentially see. + * Entities in this set will be tested for visibility/recognition in IVision::Update() + */ + virtual void CollectPotentiallyVisibleEntities( CUtlVector< CBaseEntity * > *potentiallyVisible ); + + virtual bool IsIgnored( CBaseEntity *subject ) const; // return true to completely ignore this entity (may not be in sight when this is called) + virtual bool IsVisibleEntityNoticed( CBaseEntity *subject ) const; // return true if we 'notice' the subject, even though we have LOS to it + + virtual float GetMaxVisionRange( void ) const; // return maximum distance vision can reach + virtual float GetMinRecognizeTime( void ) const; // return VISUAL reaction time + +private: + CUtlVector< CHandle< CBaseCombatCharacter > > m_potentiallyVisibleNPCVector; + CountdownTimer m_potentiallyVisibleUpdateTimer; + void UpdatePotentiallyVisibleNPCVector( void ); + + CountdownTimer m_scanTimer; +}; + + +#endif // TF_BOT_VISION_H
\ No newline at end of file |