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.

35 lines
1.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PASSTIME_BALLCONTROLLER_PLAYERSEEK_H
  8. #define PASSTIME_BALLCONTROLLER_PLAYERSEEK_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "passtime_ballcontroller.h"
  13. class CBaseEntity;
  14. //-----------------------------------------------------------------------------
  15. class CPasstimeBallControllerPlayerSeek : public CPasstimeBallController
  16. {
  17. public:
  18. CPasstimeBallControllerPlayerSeek();
  19. private:
  20. virtual bool IsActive() const OVERRIDE { return true; }
  21. virtual bool Apply( CPasstimeBall *ball ) OVERRIDE;
  22. virtual void OnDisabled() OVERRIDE { SetIsEnabled( true ); } // never actually disable
  23. virtual void OnBallSpawned( CPasstimeBall *ball ) OVERRIDE;
  24. CTFPlayer *FindTarget( CTFPlayer *pIgnorePlayer, const Vector& ballOrigin ) const;
  25. bool Seek( CPasstimeBall *ball, CTFPlayer *pTarget ) const;
  26. float m_fEnableTime;
  27. };
  28. #endif // PASSTIME_BALLCONTROLLER_PLAYERSEEK_H