diff options
Diffstat (limited to 'game/server/tf/passtime_ballcontroller_homing.h')
| -rw-r--r-- | game/server/tf/passtime_ballcontroller_homing.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/game/server/tf/passtime_ballcontroller_homing.h b/game/server/tf/passtime_ballcontroller_homing.h new file mode 100644 index 0000000..befb242 --- /dev/null +++ b/game/server/tf/passtime_ballcontroller_homing.h @@ -0,0 +1,44 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef PASSTIME_BALLCONTROLLER_HOMING_H +#define PASSTIME_BALLCONTROLLER_HOMING_H +#ifdef _WIN32 +#pragma once +#endif + +#include "passtime_ballcontroller.h" + +//----------------------------------------------------------------------------- +class CPasstimeBallControllerHoming : public CPasstimeBallController +{ +public: + CPasstimeBallControllerHoming(); + ~CPasstimeBallControllerHoming(); + void SetTargetSpeed( float f ); + void SetMaxBounces( int i ) { m_iMaxBounces = i; } + void StartHoming( CPasstimeBall *pBall, CTFPlayer *pTarget, bool isCharged ); + +private: + CHandle<CTFPlayer> m_hTarget; + CHandle<CPasstimeBall> m_hBall; + float m_fTargetSpeed; + bool m_bIsHoming; + float m_fHomingStrength; + int m_iMaxBounces; + + void StopHoming(); + virtual bool IsActive() const OVERRIDE; + virtual bool Apply( CPasstimeBall *ball ) OVERRIDE; + virtual void OnBallCollision( CPasstimeBall *ball, int index, gamevcollisionevent_t *ev ) OVERRIDE; + virtual void OnBallPickedUp( CPasstimeBall *ball, CTFPlayer *catcher ) OVERRIDE; + virtual void OnBallDamaged( CPasstimeBall *ball ) OVERRIDE; + virtual void OnBallSpawned( CPasstimeBall *ball ) OVERRIDE; + virtual void OnDisabled() OVERRIDE; +}; + +#endif // PASSTIME_BALLCONTROLLER_HOMING_H |