mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
FIX: Prediction.CorrectHistory() now adjusts afterIndex after dequeing!
This commit is contained in:
parent
65ce7d35cb
commit
9bff895564
@ -110,7 +110,11 @@ public static T CorrectHistory<T>(
|
||||
// respect the limit
|
||||
// TODO unit test to check if it respects max size
|
||||
if (history.Count >= stateHistoryLimit)
|
||||
{
|
||||
history.Dequeue();
|
||||
// if we remove one entry, then we also need to adjust the afterIndex
|
||||
afterIndex -= 1;
|
||||
}
|
||||
|
||||
// unlike with SortedList, we don't insert corrections for RingBuffer.
|
||||
// we only correct the values after it since insertions would be awkward for RingBuffer.
|
||||
|
Loading…
Reference in New Issue
Block a user