source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Fixed server physics when server has custom tickrate

Open tyabus opened this issue 4 years ago • 2 comments

tyabus avatar May 19 '21 06:05 tyabus

Shouldn't the client tickrate also be adjusted? Otherwise it would desync?

https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/client/physics.cpp#L180

-physenv->SetSimulationTimestep( IsXbox() ? DEFAULT_XBOX_CLIENT_VPHYSICS_TICK : DEFAULT_TICK_INTERVAL );
+physenv->SetSimulationTimestep( IsXbox() ? DEFAULT_XBOX_CLIENT_VPHYSICS_TICK : gpGlobals->interval_per_tick );

neico avatar Jun 27 '21 11:06 neico

Shouldn't the client tickrate also be adjusted? Otherwise it would desync?

https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/client/physics.cpp#L180

-physenv->SetSimulationTimestep( IsXbox() ? DEFAULT_XBOX_CLIENT_VPHYSICS_TICK : DEFAULT_TICK_INTERVAL );
+physenv->SetSimulationTimestep( IsXbox() ? DEFAULT_XBOX_CLIENT_VPHYSICS_TICK : gpGlobals->interval_per_tick );

I've ran hl2dm server at 44 tickrate with this like for a year, and i didn't noticed any strange behavior on client.

tyabus avatar Jun 29 '21 08:06 tyabus