-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
hello everybody
this thread was created in order to understand in more detail the work of the CLagCompensationManager::StartLagCompensation and void CLagCompensationManager::RecordDataIntoTrack function but we will parse only IsValidTick
===========================================================================================================
okay, let's go to leaked csgo source and to the ida too
example:
also pseudo code from CLagCompensationManager::RecordDataIntoTrack
but valve is this fucking retards and dead time check not need in ur IsValidTick function
i wait when valve fix this issue related to dead_time
P.S weather tickbase is supposed to be used here shouldnt really matter as i am testing on a local server and curtime and tickbase are identical (or maybe a few ms apart), also than u could only lagcomp a max of 200ms backwards from the curtime, and that sort of defeats the purpose of checking for fabsf(delta) > 0.2f + their correct with latency etc
this thread was created in order to understand in more detail the work of the CLagCompensationManager::StartLagCompensation and void CLagCompensationManager::RecordDataIntoTrack function but we will parse only IsValidTick
===========================================================================================================
okay, let's go to leaked csgo source and to the ida too
Пожалуйста, авторизуйтесь для просмотра ссылки.
u can look this check prevents backtracking for more than 200ms also you can increase the backtrack with a fake latency ( but u need clamp fake latency in their correct )example:
C++:
// get fake latency
auto in_latency = nci->get_latency( FLOW_IN );
// get real latency
auto out_latency = nci->get_latency( FLOW_OUT );
// check bounds
// sub_1007F9D0 is this C_BaseEntity::GetInterpolationAmount()
correct = std::clamp( out_latency + in_latency + sub_1007F9D0( ) );
// calculate difference between tick sent by player and our latency based tick
auto delta_time = correct = ( GlobalVas->curtime - simulation_time );
if ( fabsf( delta_time ) > 0.2 )
return 0;
// dead time check
// if tail is within limits, stop
int flDeadTime = GlobalVas->curtime - sv_maxunlag->GetFloat( );
return ( simulation_time >= ( float )flDeadTime );
C++:
v5 = *(float *)(GlobalVas + 16) - v22; // flDeadtime
v6 = (signed int)v5; // ( int )flDeadtime
while ( 1 )
{
v7 = a3[4];
if ( !v7 || *(_DWORD *)(v7 + 400) == v7 && *(_DWORD *)(v7 + 404) != v7 )
break;
v5 = *(float *)(v7 + 52);
if ( v5 >= (float)v6 )
break;
sub_10319FF0(a3[4]);
}
i wait when valve fix this issue related to dead_time
P.S weather tickbase is supposed to be used here shouldnt really matter as i am testing on a local server and curtime and tickbase are identical (or maybe a few ms apart), also than u could only lagcomp a max of 200ms backwards from the curtime, and that sort of defeats the purpose of checking for fabsf(delta) > 0.2f + their correct with latency etc