It seems like there's already functionality for it in the engine. Seems relatively straight forward to add, could be either a hook or a function eg. physenv.Enable()physenv.Disable()physenv.Status()physenv.Toggle() or hook.Add( "PhysenvShouldSimulate",
Being able to "pause" physics would be pretty useful for when there's server lag, you could even theoretically only run physics once every 2 ticks for example.
It seems like there's already functionality for it in the engine. Seems relatively straight forward to add, could be either a hook or a function eg.
physenv.Enable()
physenv.Disable()
physenv.Status()
physenv.Toggle()
orhook.Add( "PhysenvShouldSimulate",
Engine code:
PhysFrame
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/server/physics.cpp#L1676-L1677g_PhysicsHook.ShouldSimulate
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/server/physics.cpp#L134-L137Being able to "pause" physics would be pretty useful for when there's server lag, you could even theoretically only run physics once every 2 ticks for example.