/// <summary> /// Records an acked status from the peer for a given entity ID. /// </summary> public void RecordUpdate(EntityId entityId, ViewEntry entry) { if (!LatestUpdates.TryGetValue(entityId, out var currentEntry) || currentEntry.Tick <= entry.Tick) { LatestUpdates[entityId] = entry; } }
/// <summary> /// Returns the latest tick the peer has acked for this entity ID. /// </summary> public ViewEntry GetLatest(EntityId id) { return(LatestUpdates.TryGetValue(id, out var result) ? result : ViewEntry.INVALID); }