blob: befb2427015ff842866a7631ca27a0a77856d883 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
|