Skip to content

Commit

Permalink
Reduce Warping By Simulating Lost Time
Browse files Browse the repository at this point in the history
  • Loading branch information
Deaod committed Feb 29, 2024
1 parent 4da8b09 commit 76bcaea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/bbPlayer.uc
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,11 @@ function ServerApplyInput(float RefTimeStamp, int NumBits, ReplBuffer B) {
if (IGPlus_UseFastWeaponSwitch && PendingWeapon != None)
ChangedWeapon();

// play back input
// simulate lost time to match extrapolation done by all clients
LostTime = RefTimeStamp - Old.TimeStamp; // typically <= 0
if (LostTime > 0.001)
SimMoveAutonomous(LostTime);

while(Old.Next != none) {
PlayBackInput(Old, Old.Next);
if (bTraceInput && IGPlus_InputLogFile != none)
Expand Down

0 comments on commit 76bcaea

Please sign in to comment.