Fix NetworkTransform to properly reject local simulation deltas on incoming authoritative transform data
#1907
This commit is contained in:
@@ -301,11 +301,8 @@ void NetworkTransform::Deserialize(NetworkStream* stream)
|
|||||||
_buffer.Clear();
|
_buffer.Clear();
|
||||||
_bufferHasDeltas = true;
|
_bufferHasDeltas = true;
|
||||||
}
|
}
|
||||||
// TODO: items are added in order to do batch removal
|
while (_buffer.Count() != 0 && _buffer[0].SequenceIndex < sequenceIndex)
|
||||||
for (int32 i = 0; i < _buffer.Count() && _buffer[i].SequenceIndex < sequenceIndex; i++)
|
_buffer.RemoveAtKeepOrder(0);
|
||||||
{
|
|
||||||
_buffer.RemoveAtKeepOrder(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use received authoritative actor transformation but re-apply all deltas not yet processed by the server due to lag (reconciliation)
|
// Use received authoritative actor transformation but re-apply all deltas not yet processed by the server due to lag (reconciliation)
|
||||||
for (auto& e : _buffer)
|
for (auto& e : _buffer)
|
||||||
|
|||||||
Reference in New Issue
Block a user