Counter Strike : Global Offensive Source Code
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.

54 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef AI_MOVESHOOT_H
  7. #define AI_MOVESHOOT_H
  8. #include "ai_component.h"
  9. #if defined( _WIN32 )
  10. #pragma once
  11. #endif
  12. //-----------------------------------------------------------------------------
  13. // @TODO (toml 07-09-03): probably want to fold this into base NPC. evaluate when
  14. // head above water
  15. class CAI_MoveAndShootOverlay : public CAI_Component
  16. {
  17. typedef CAI_Component BaseClass;
  18. public:
  19. CAI_MoveAndShootOverlay();
  20. void StartShootWhileMove( );
  21. void NoShootWhileMove();
  22. void RunShootWhileMove();
  23. void EndShootWhileMove();
  24. void SuspendMoveAndShoot( float flDuration );
  25. bool IsSuspended() { return m_flSuspendUntilTime > gpGlobals->curtime; }
  26. void SetInitialDelay( float delay );
  27. bool IsMovingAndShooting( void ) const { return m_bMovingAndShooting; }
  28. private:
  29. bool HasAvailableRangeAttack();
  30. bool CanAimAtEnemy();
  31. void UpdateMoveShootActivity( bool bMoveAimAtEnemy );
  32. bool m_bMovingAndShooting;
  33. bool m_bNoShootWhileMove;
  34. float m_initialDelay;
  35. float m_flSuspendUntilTime;
  36. DECLARE_SIMPLE_DATADESC();
  37. };
  38. //-----------------------------------------------------------------------------
  39. #endif // AI_MOVESHOOT_H