RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Predict component adding and removal

Open ElectroJr opened this issue 3 years ago • 1 comments
trafficstars

Currently waiting on #3000

Fixes #2144. Required for, and tested in-game using space-wizards/space-station-14/pull/8475.

ElectroJr avatar May 27 '22 02:05 ElectroJr

I might just not properly understand the gamestate manager/processor, but I think that when _waitingForFull is true it uses the wrong tick when calling ResetPredictedEntities()? Or more generally, because CurTick is sometimes set inside ProcessTickStates() before the predicted entities are reset, using ResetPredictedEntities(_timing.CurTick) is generally wrong?

I am no longer sure about the differences between GameStateProcessor.LastProcessedRealState, ClientGameStateManager.CurServerTick (aka _lastProcessedTick), IGameTiming.LastRealTick, and how they relate to IGameTiming.CurTick.

I'm not sure why LastProcessedRealState and CurTick are being set by ProcessTickStates() before the states are applied, because without also updating LastRealTick. it results in IGameTiming.InPrediction being true while applying states, which it really shouldn't be.

Somebody please help.

ElectroJr avatar May 27 '22 03:05 ElectroJr