summaryrefslogtreecommitdiff
path: root/gmod/movement.hpp
blob: f9e3ced2cbd096202f82cfc60c0862c693249cf1 (plain)
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
#pragma once
#include "util.hpp"

//forward declarations
class user_cmd_t;

NAMESPACE_REGION( features )

class c_movement {
	user_cmd_t* m_ucmd{ };
	bool		m_direction{ };

	void bhop( );
	void auto_strafer( );
	void edge_jump( );
	void auto_jumpbug( );
	void jump_stats( );

	bool  get_best_direction( float ideal_step, float left, float right, float weight );
	float get_best_strafe_step( float speed, vec3_t direction );
	float get_best_strafe_angle( );
	void circle_strafe( );

public:
	void operator()( user_cmd_t* ucmd ) {
		m_ucmd = ucmd;
		auto_strafer( );
		//circle_strafe( );
		bhop( );
		edge_jump( );
		//auto_jumpbug( );
		//jump_stats( );
	}
};

END_REGION