Browse Source

Engine: Keep HTTP from endlessly formatting NaN values

For whatever reason, our progress count for HTTP downloads stays at 0.
This results in the engine calculating a NaN progress value many times
each frame, which results in a significant performance hit.
pull/2/head
Tim Schumacher 3 years ago committed by Alibek Omarov
parent
commit
a1ce5faac2
  1. 2
      engine/common/net_ws.c

2
engine/common/net_ws.c

@ -2280,7 +2280,7 @@ void HTTP_Run( void ) @@ -2280,7 +2280,7 @@ void HTTP_Run( void )
}
// update progress
if( !Host_IsDedicated() )
if( !Host_IsDedicated() && iProgressCount != 0 )
Cvar_SetValue( "scr_download", flProgress/iProgressCount * 100 );
HTTP_AutoClean();

Loading…
Cancel
Save