From d1cab43b8ffd1fd37633e4751818d14c840ecef9 Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 17 Sep 2018 20:09:00 +0200 Subject: d --- internal_rewrite/ragebot.hpp | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'internal_rewrite/ragebot.hpp') diff --git a/internal_rewrite/ragebot.hpp b/internal_rewrite/ragebot.hpp index 8a7e856..1c4e7ed 100644 --- a/internal_rewrite/ragebot.hpp +++ b/internal_rewrite/ragebot.hpp @@ -160,6 +160,7 @@ namespace features float m_flDuckSpeed{ }; float m_animDuck{ }; int m_fFlags{ }; + int m_animFlags{ }; vec3_t m_animVelocity{ }; vec3_t m_prevVelocity{ }; @@ -258,10 +259,11 @@ namespace features user_cmd_t* m_cmd; }; - enum BreakingState_t { - BREAKING_NONE, - BREAKING, - BREAKING_LAST, + enum ResolverState_t { + R_NONE, + R_NORMAL, + R_FREESTANDING, + R_LAST, }; enum OverrideDir_t { @@ -286,17 +288,10 @@ namespace features int manual_override( c_base_player* ); void force_lby( c_base_player* ); void on_missed_spread( int ent_index, int shots ); + int try_freestanding( c_base_player* ); void update_player( int i ); - __forceinline bool is_breaking_lby( int ent_index ) { - return !!m_data[ ent_index ].m_breaking; - } - - __forceinline int get_breaking_state( int ent_index ) { - return m_data[ ent_index ].m_breaking; - } - void increment_shots( int ent_index ); __forceinline int get_shots( int ent_index ) { @@ -309,6 +304,16 @@ namespace features return m_data[ ent_index ].m_angle_change; } + __forceinline int get_state( int ent_index ) { + return m_data[ ent_index ].m_state; + } + + __forceinline int& get_resolver_shots( int ent_index ) { + auto& data = m_data[ ent_index ]; + + return data.m_shots[ data.m_state ]; + } + protected: struct resolve_log_t { @@ -316,19 +321,19 @@ namespace features void update( int ent_index ); void reset( ); - bool m_logged{ }; + bool m_logged[ R_LAST ]{ }; float m_logged_lby{ }; - int m_breaking{ }; + int m_state{ }; float m_last_lby{ }; float m_last_moving_lby{ }; float m_last_update{ }; - int m_shots{ }; + int m_shots[ R_LAST ]{ }; bool m_was_invalid{ }; bool m_has_valid_lby{ }; int m_last_freestanding{ }; int m_overriding{ }; int m_missed_shots{ }; - int m_logged_shots{ }; + int m_logged_shots[ R_LAST ]{ }; bool m_angle_change{ }; vec3_t m_last_pos{ }; }; -- cgit v1.2.3