summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite/net_showfragments.cpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2018-12-05 18:11:08 +1300
committerboris <wzn@moneybot.cc>2018-12-05 18:11:08 +1300
commit65ce24409cbb7a4da18751e5043978ded5090fac (patch)
tree0b65806aa03c2cdf9fc95b519d0b09582279381e /cheat/internal_rewrite/net_showfragments.cpp
parent793965d3c2816fc1b672c9173b3b831d82cdec33 (diff)
im a retard
double events still happen :|
Diffstat (limited to 'cheat/internal_rewrite/net_showfragments.cpp')
-rw-r--r--cheat/internal_rewrite/net_showfragments.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/cheat/internal_rewrite/net_showfragments.cpp b/cheat/internal_rewrite/net_showfragments.cpp
index 93e5db0..e2885c9 100644
--- a/cheat/internal_rewrite/net_showfragments.cpp
+++ b/cheat/internal_rewrite/net_showfragments.cpp
@@ -6,45 +6,45 @@
int __fastcall hooks::net_showfragments_get_int( void* ecx_, void* edx_ ) {
static auto old_fn = g_csgo.m_netshowfragments->get_old_function< decltype( &net_showfragments_get_int ) >( 13 );
- static auto ret_checkreceivinglist = pattern::first_code_match( g_csgo.m_engine.dll( ), xors( "FF 50 34 8B 1D ? ? ? ? 85 C0 74 16 FF B6" ), 0x3 );
- static auto ret_readsubchanneldata = pattern::first_code_match( g_csgo.m_engine.dll( ), xors( "FF 50 34 85 C0 74 12 53 FF 75 0C" ), 0x3 );
-
- static auto last_fragment = 0;
- static auto last_time = 0.f;
-
- stack_t stack( get_baseptr( ) );
- auto cl = g_csgo.m_global_state->get_client_state( );
- auto nc = cl->m_netchannel;
-
- auto nci = g_csgo.m_engine( )->GetNetChannelInfo( );
-
- if ( nci && ( nci->GetLatency( 1 ) > 0.06f ) && g_ctx.m_local ) {
- if ( stack.return_address( ) == ret_readsubchanneldata ) {
- auto e = ( uint32_t* ) ( nc );
- auto data = &e [ 0x54 ];
-
- auto fragment = data [ 0x43 ];
-
- if ( fragment == last_fragment ) {
- float delta = GetTickCount( ) * 0.001f - last_time;
-
- if ( delta <= std::max( nci->GetLatency( 1 ), 0.3f ) ) {
- ( ( uint32_t* ) data ) [ 0x42 ] = 0;
- last_time = GetTickCount( ) * 0.001f;
- }
- }
- }
-
- if ( stack.return_address( ) == ret_checkreceivinglist ) {
- auto e = ( uint32_t* ) ( nc );
- auto data = &e [ 0x54 ];
-
- auto fragment = data [ 0x43 ];
-
- last_fragment = fragment;
- last_time = GetTickCount( ) * 0.001f;
- }
- }
+ //static auto ret_checkreceivinglist = pattern::first_code_match( g_csgo.m_engine.dll( ), xors( "FF 50 34 8B 1D ? ? ? ? 85 C0 74 16 FF B6" ), 0x3 );
+ //static auto ret_readsubchanneldata = pattern::first_code_match( g_csgo.m_engine.dll( ), xors( "FF 50 34 85 C0 74 12 53 FF 75 0C" ), 0x3 );
+ //
+ //static auto last_fragment = 0;
+ //static auto last_time = 0.f;
+ //
+ //stack_t stack( get_baseptr( ) );
+ //auto cl = g_csgo.m_global_state->get_client_state( );
+ //auto nc = cl->m_netchannel;
+ //
+ //auto nci = g_csgo.m_engine( )->GetNetChannelInfo( );
+ //
+ //if ( nci && ( nci->GetLatency( 1 ) > 0.06f ) && g_ctx.m_local ) {
+ // if ( stack.return_address( ) == ret_readsubchanneldata ) {
+ // auto e = ( uint32_t* ) ( nc );
+ // auto data = &e [ 0x54 ];
+ //
+ // auto fragment = data [ 0x43 ];
+ //
+ // if ( fragment == last_fragment ) {
+ // float delta = GetTickCount( ) * 0.001f - last_time;
+ //
+ // if ( delta <= std::max( nci->GetLatency( 1 ), 0.3f ) ) {
+ // ( ( uint32_t* ) data ) [ 0x42 ] = 0;
+ // last_time = GetTickCount( ) * 0.001f;
+ // }
+ // }
+ // }
+ //
+ // if ( stack.return_address( ) == ret_checkreceivinglist ) {
+ // auto e = ( uint32_t* ) ( nc );
+ // auto data = &e [ 0x54 ];
+ //
+ // auto fragment = data [ 0x43 ];
+ //
+ // last_fragment = fragment;
+ // last_time = GetTickCount( ) * 0.001f;
+ // }
+ //}
return old_fn( ecx_, 0 );
} \ No newline at end of file