mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Set IsFirstTimePredicted to false during state application (#3866)
This commit is contained in:
@@ -35,7 +35,7 @@ END TEMPLATE-->
|
||||
|
||||
### Breaking changes
|
||||
|
||||
*None yet*
|
||||
* `IGameTiming.IsFirstTimePredicted` is now false while applying game states.
|
||||
|
||||
### New features
|
||||
|
||||
|
||||
@@ -448,8 +448,7 @@ namespace Robust.Client.GameStates
|
||||
PredictionNeedsResetting = false;
|
||||
|
||||
using var _ = _prof.Group("ResetPredictedEntities");
|
||||
using var __ = _timing.StartPastPredictionArea();
|
||||
using var ___ = _timing.StartStateApplicationArea();
|
||||
using var __ = _timing.StartStateApplicationArea();
|
||||
|
||||
var countReset = 0;
|
||||
var system = _entitySystemManager.GetEntitySystem<ClientDirtySystem>();
|
||||
|
||||
@@ -73,11 +73,14 @@ namespace Robust.Client.Timing
|
||||
|
||||
public void StartStateApplication()
|
||||
{
|
||||
DebugTools.Assert(IsFirstTimePredicted, "Starting state application in the middle of a past prediction.");
|
||||
IsFirstTimePredicted = false;
|
||||
ApplyingState = true;
|
||||
}
|
||||
|
||||
public void EndStateApplication()
|
||||
{
|
||||
IsFirstTimePredicted = true;
|
||||
ApplyingState = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user