summaryrefslogtreecommitdiff
path: root/internal_rewrite/ragebot.hpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-09-17 20:09:00 +0200
committernavewindre <boneyaard@gmail.com>2018-09-17 20:09:00 +0200
commitd1cab43b8ffd1fd37633e4751818d14c840ecef9 (patch)
tree1f6932efba0142fe964ba9d9ba4beb837958ed5f /internal_rewrite/ragebot.hpp
parentfb2b56fd3c26d37ef198fe6dbf651104656f8a34 (diff)
d
Diffstat (limited to 'internal_rewrite/ragebot.hpp')
-rw-r--r--internal_rewrite/ragebot.hpp37
1 files changed, 21 insertions, 16 deletions
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{ };
};