From d1ec3d3bb3a87a08e1c9348ca6e482549ebde664 Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 2 Jan 2019 17:46:05 +1300 Subject: fixed bug and idk i really dont wanna work on this anymore holy fuck --- cheat/internal_rewrite/extra.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cheat/internal_rewrite/extra.cpp') diff --git a/cheat/internal_rewrite/extra.cpp b/cheat/internal_rewrite/extra.cpp index 2cffb39..66aba08 100644 --- a/cheat/internal_rewrite/extra.cpp +++ b/cheat/internal_rewrite/extra.cpp @@ -87,7 +87,7 @@ namespace features // emplace new record netchan_record_t record{ - g_csgo.m_globals->m_realtime, + g_csgo.m_globals->m_curtime, netchan->m_nInReliableState, netchan->m_nInSequenceNr }; @@ -99,7 +99,7 @@ namespace features // clear outdated records for( size_t i{ }; i < m_net_records.size( ); ++i ) { - const float delta = g_csgo.m_globals->m_realtime - m_net_records.at( i ).m_realtime; + const float delta = g_csgo.m_globals->m_curtime - m_net_records.at( i ).m_curtime; // 200ms is the max we can fake anyway.. // hnn this might be why it's so fucked :/ @@ -109,6 +109,9 @@ namespace features } void c_extra::add_latency( INetChannel* channel ) { + if(!g_settings.misc.net_fakelag()) + return; + auto nci = g_csgo.m_engine( )->GetNetChannelInfo( ); float in_latency = nci->GetLatency( 0 ); @@ -118,7 +121,7 @@ namespace features if( g_ctx.m_local && g_ctx.m_local->is_valid( ) ) { // god this is autistic for( auto& it : m_net_records ) { - const float delta = g_csgo.m_globals->m_realtime - it.m_realtime; + const float delta = g_csgo.m_globals->m_curtime - it.m_curtime; if( delta >= latency ) { // apply latency -- cgit v1.2.3