summaryrefslogtreecommitdiff
path: root/gmod/legitbot.hpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2018-11-28 16:00:02 +1300
committerboris <wzn@moneybot.cc>2018-11-28 16:00:02 +1300
commit3d412a4b30a9f7c7f51ea6562e694315948bd3da (patch)
tree26d67dfd1f3e5fd12903ad13e85d0cb8bcf8f21c /gmod/legitbot.hpp
parente4729e4393d90271a3814c7a79950a660c48325a (diff)
cleaned up
in short, the cheat and loader are now separate solutions. unused stuff was moved into the legacy solution in case anyone wants to compile it or whatever. i can change this back if you want to. also, i configured the loader to compile in x64, and have separate build types for linux and win64
Diffstat (limited to 'gmod/legitbot.hpp')
-rw-r--r--gmod/legitbot.hpp75
1 files changed, 0 insertions, 75 deletions
diff --git a/gmod/legitbot.hpp b/gmod/legitbot.hpp
deleted file mode 100644
index f5d4243..0000000
--- a/gmod/legitbot.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#pragma once
-#include <deque>
-#include <chrono>
-
-#include "sdk.hpp"
-
-namespace features
-{
- class c_legitbot {
- public:
- void operator()( float* x, float* y ) {
- aimbot( x, y );
- }
-
- //call once per tick
- void sample_angle_data( const vec3_t& angle );
- void triggerbot( user_cmd_t* cmd );
- private:
- struct aim_record_t {
- vec3_t m_viewangles;
- float m_time;
- };
-
- struct lag_record_t {
- int m_tickcount{ };
- vec3_t m_position{ };
- matrix3x4 m_matrix[ 128 ]{ };
-
- bool is_valid( );
- };
-
- class c_lagcomp {
- public:
- friend class c_legitbot;
- using lag_deque_t = std::deque< lag_record_t >;
-
- lag_record_t* find_best_record( int ent_index );
- vec3_t get_backtracked_position( int ent_index );
- auto& get_records( int ent_index ) {
- return m_data[ ent_index ];
- }
-
- void store( );
- void operator()( user_cmd_t* cmd );
-
- private:
- bool backtrack_entity( int ent_index );
- bool can_backtrack_entity( int ent_index );
- void store_player( int ent_index );
-
- lag_deque_t m_data[ 65 ];
- user_cmd_t* m_cmd;
- };
-
- vec2_t angle_to_pixels( const vec3_t& angle );
- vec3_t pixels_to_angle( const vec2_t& pixel );
- void aimbot( float* x, float* y );
- void assist( c_base_player* player, float* x, float* y );
- void aim_at_target( c_base_player*, float*, float* );
-
- bool update_settings( );
- float get_avg_delta( );
- int get_aim_target( float fov = 0.f );
-
- private:
- float m_deltatime{ };
- float m_curtime{ };
- bool m_aiming{ };
-
- std::deque< aim_record_t > m_angle_samples;
-
- public:
- c_lagcomp m_lagcomp;
- };
-} \ No newline at end of file