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 ++++++--- cheat/internal_rewrite/extra.hpp | 2 +- cheat/internal_rewrite/internal_rewrite.vcxproj | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'cheat') 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 diff --git a/cheat/internal_rewrite/extra.hpp b/cheat/internal_rewrite/extra.hpp index 5c7d5f4..f3ab837 100644 --- a/cheat/internal_rewrite/extra.hpp +++ b/cheat/internal_rewrite/extra.hpp @@ -9,7 +9,7 @@ namespace features // i'm gay struct netchan_record_t { - float m_realtime; + float m_curtime; int32_t m_reliable; int32_t m_sequence; }; diff --git a/cheat/internal_rewrite/internal_rewrite.vcxproj b/cheat/internal_rewrite/internal_rewrite.vcxproj index f75393b..3d30b5a 100644 --- a/cheat/internal_rewrite/internal_rewrite.vcxproj +++ b/cheat/internal_rewrite/internal_rewrite.vcxproj @@ -46,7 +46,7 @@ 15.0 {140DEC51-B0E7-4289-BB6F-79686422318E} internal_rewrite - 10.0.17134.0 + 10.0.17763.0 csgo -- cgit v1.2.3