Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

  1. // NextBotHearingInterface.h
  2. // Interface for auditory queries of a bot
  3. // Author: Michael Booth, April 2005
  4. //========= Copyright Valve Corporation, All rights reserved. ============//
  5. #ifndef _NEXT_BOT_HEARING_INTERFACE_H_
  6. #define _NEXT_BOT_HEARING_INTERFACE_H_
  7. #include "NextBotComponentInterface.h"
  8. //----------------------------------------------------------------------------------------------------------------
  9. /**
  10. * The interface for hearing sounds
  11. */
  12. class IHearing : public INextBotComponent
  13. {
  14. public:
  15. IHearing( INextBot *bot ) : INextBotComponent( bot ) { }
  16. virtual ~IHearing() { }
  17. virtual void Reset( void ); // reset to initial state
  18. virtual void Update( void ); // update internal state
  19. virtual float GetTimeSinceHeard( int team ) const; // return time since we heard any member of the given team
  20. virtual CBaseEntity *GetClosestRecognized( int team = TEAM_ANY ) const; // return the closest recognized entity
  21. virtual int GetRecognizedCount( int team, float rangeLimit = -1.0f ) const; // return the number of actors on the given team visible to us closer than rangeLimit
  22. virtual float GetMaxHearingRange( void ) const; // return maximum distance we can hear
  23. virtual float GetMinRecognizeTime( void ) const; // return HEARING reaction time
  24. };
  25. #endif // _NEXT_BOT_HEARING_INTERFACE_H_