summaryrefslogtreecommitdiff
path: root/game/shared/tf2/tf_gamemovement_commando.h
blob: fa3982a1a359d7fb4738f8e1d776dbd42394be2c (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Auto Repair
//
// $NoKeywords: $
//=============================================================================//

#ifndef TF_GAMEMOVEMENT_COMMANDO_H
#define TF_GAMEMOVEMENT_COMMANDO_H
#ifdef _WIN32
#pragma once
#endif

#include "tf_gamemovement.h"
#include "tfclassdata_shared.h"

class CTFMoveData;

//=============================================================================
//
// Commando Game Movement Class
//
class CTFGameMovementCommando : public CTFGameMovement
{
public:

	DECLARE_CLASS( CTFGameMovementCommando, CTFGameMovement );

	CTFGameMovementCommando();

	// Interface Implementation
	void			ProcessClassMovement( CBaseTFPlayer *pPlayer, CTFMoveData *pTFMoveData );
	Vector const   &GetPlayerMins( bool bDucked ) const;
	Vector const   &GetPlayerMaxs( bool bDucked ) const;
	Vector const   &GetPlayerViewOffset( bool bDucked ) const;

protected:

	// TF2 movement overrides.
	bool			PrePlayerMove( void );
	void			HandlePlayerMove( void );
	void			HandleDuck( void );

	void			SetupViewAngles( void );
	void			UpdateTimers( void );
	void			SetupSpeed( void );

	bool			CalcWishVelocityAndPosition( Vector &vWishPos, Vector &vWishDir, float &flWishSpeed );

	bool			CheckDoubleTapForward( void );

	void			CheckBullRush( void );
	void			BullRushMove( void );

	PlayerClassCommandoData_t  *m_pCommandoData; 
	Vector						m_vStandMins;
	Vector						m_vStandMaxs;
	Vector						m_vStandViewOffset;
	Vector						m_vDuckMins;
	Vector						m_vDuckMaxs;
	Vector						m_vDuckViewOffset;
};

#endif // TF_GAMEMOVEMENT_COMMANDO_H