summaryrefslogtreecommitdiff
path: root/internal_rewrite/movement.hpp
diff options
context:
space:
mode:
authorJustSomePwner <crotchyalt@gmail.com>2018-08-30 14:01:54 +0200
committerJustSomePwner <crotchyalt@gmail.com>2018-08-30 14:01:54 +0200
commit7ccb819f867493f8ec202ea3b39c94c198c64584 (patch)
tree94622e61af0ff359e3d6689cf274d74f60b2492a /internal_rewrite/movement.hpp
parent564d979b79e8a5aaa5014eba0ecd36c61575934f (diff)
first
Diffstat (limited to 'internal_rewrite/movement.hpp')
-rw-r--r--internal_rewrite/movement.hpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/internal_rewrite/movement.hpp b/internal_rewrite/movement.hpp
new file mode 100644
index 0000000..0c0b1a6
--- /dev/null
+++ b/internal_rewrite/movement.hpp
@@ -0,0 +1,39 @@
+#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( );
+ void air_duck( );
+
+public:
+ void operator()( user_cmd_t* ucmd ) {
+ m_ucmd = ucmd;
+ auto_strafer( );
+ circle_strafe( );
+ bhop( );
+ edge_jump( );
+ auto_jumpbug( );
+ jump_stats( );
+ air_duck( );
+ }
+};
+
+END_REGION \ No newline at end of file