Skip to content

Commit 010c5cb

Browse files
treacherousfiendEricS-Valve
authored andcommitted
fix net_graph using raw client interp
1 parent a202d4e commit 010c5cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/game/client/vgui_netgraphpanel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,10 @@ void CNetGraphPanel::DrawTextFields( int graphvalue, int x, int y, int w, netban
768768

769769
g_pMatSystemSurface->DrawColoredText( font, x, y, GRAPH_RED, GRAPH_GREEN, GRAPH_BLUE, 255, "%s", sz );
770770

771-
Q_snprintf( sz, sizeof( sz ), "lerp: %5.1f ms", GetClientInterpAmount() * 1000.0f );
771+
Q_snprintf( sz, sizeof( sz ), "lerp: %5.1f ms", ROUND_TO_TICKS( GetClientInterpAmount() ) * 1000.0f );
772772

773773
int interpcolor[ 3 ] = { (int)GRAPH_RED, (int)GRAPH_GREEN, (int)GRAPH_BLUE };
774-
float flInterp = GetClientInterpAmount();
774+
float flInterp = ROUND_TO_TICKS( GetClientInterpAmount() );
775775
if ( flInterp > 0.001f )
776776
{
777777
// Server framerate is lower than interp can possibly deal with
@@ -782,7 +782,7 @@ void CNetGraphPanel::DrawTextFields( int graphvalue, int x, int y, int w, netban
782782
interpcolor[ 2 ] = 31;
783783
}
784784
// flInterp is below recommended setting!!!
785-
else if ( flInterp < ( 2.0f / cl_updaterate->GetFloat() ) )
785+
else if ( flInterp < ROUND_TO_TICKS( 2.0f / cl_updaterate->GetFloat() ) )
786786
{
787787
interpcolor[ 0 ] = 255;
788788
interpcolor[ 1 ] = 125;

0 commit comments

Comments
 (0)