diff options
| author | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2018-11-28 16:00:02 +1300 |
| commit | 3d412a4b30a9f7c7f51ea6562e694315948bd3da (patch) | |
| tree | 26d67dfd1f3e5fd12903ad13e85d0cb8bcf8f21c /cheat/gmod/proxies.cpp | |
| parent | e4729e4393d90271a3814c7a79950a660c48325a (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 'cheat/gmod/proxies.cpp')
| -rw-r--r-- | cheat/gmod/proxies.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/cheat/gmod/proxies.cpp b/cheat/gmod/proxies.cpp new file mode 100644 index 0000000..200a370 --- /dev/null +++ b/cheat/gmod/proxies.cpp @@ -0,0 +1,43 @@ +#include "hooks.hpp"
+#include "context.hpp"
+#include "base_cheat.hpp"
+
+void __cdecl hooks::lby_proxy_fn( const CRecvProxyData* proxy_data_const, void* entity, void* output ) {
+ lby_proxy.get_old_function( )( proxy_data_const, entity, output );
+
+ if( !g_csgo.m_panic ) {
+ auto player = ( c_base_player* )( entity );
+ if( player && player == g_ctx.m_local ) {
+ g_cheat.m_ragebot.m_antiaim->on_lby_proxy( );
+ }
+ }
+}
+
+void __cdecl hooks::last_shot_proxy_fn( const CRecvProxyData* proxy_data_const, void* entity, void* output ) {
+ last_shot_proxy.get_old_function( )( proxy_data_const, entity, output );
+
+ if( !g_csgo.m_panic && proxy_data_const ) {
+ auto wep = ( c_base_weapon* )( entity );
+ if( wep ) {
+ auto owner = g_csgo.m_entlist( )->GetClientEntityFromHandle( wep->m_hOwner( ) );
+ if( owner && owner->is_valid( ) ) {
+
+ auto records = g_cheat.m_ragebot.m_lagcomp->get_records( owner->ce( )->GetIndex( ), RECORD_NORMAL );
+ if( records && records->size( ) ) {
+ for( auto& it : *records ) {
+ float sim = it.m_flSimulationTime;
+ if( sim == wep->get< float >( 0x3314 ) ) {
+ it.m_tickcount -= it.m_choked;
+ auto ang = math::vector_angles( owner->get_hitbox_pos( 0 ), g_ctx.m_local->get_eye_pos( ) );
+ //g_con->log( "found shot record for %d: %f angles: %f %f", owner->ce( )->GetIndex( ), sim, it.m_vecAngles.x, it.m_vecAngles.y );
+
+ it.m_vecAngles = it.m_vecRenderAngles = ang;
+ it.m_vecAbsAngles.y = ang.y;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file |
