From 7ccb819f867493f8ec202ea3b39c94c198c64584 Mon Sep 17 00:00:00 2001 From: JustSomePwner Date: Thu, 30 Aug 2018 14:01:54 +0200 Subject: first --- gmod/movement.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gmod/movement.hpp (limited to 'gmod/movement.hpp') diff --git a/gmod/movement.hpp b/gmod/movement.hpp new file mode 100644 index 0000000..f9e3ced --- /dev/null +++ b/gmod/movement.hpp @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3