summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite/extra.cpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2019-01-02 17:46:05 +1300
committerboris <wzn@moneybot.cc>2019-01-02 17:46:05 +1300
commitd1ec3d3bb3a87a08e1c9348ca6e482549ebde664 (patch)
treeb1b4d86bdc9e9c83a02e2ad3258a61674421eb07 /cheat/internal_rewrite/extra.cpp
parent16b4fd429ecaf259c4e2bd7307431f3c855812e8 (diff)
fixed bug and idk
i really dont wanna work on this anymore holy fuck
Diffstat (limited to 'cheat/internal_rewrite/extra.cpp')
-rw-r--r--cheat/internal_rewrite/extra.cpp9
1 files changed, 6 insertions, 3 deletions
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