NetworkServer: trim newObservers

This commit is contained in:
vis2k 2022-04-29 18:48:25 +08:00
parent 590c26d807
commit 4c1f50119f

View File

@ -1504,8 +1504,10 @@ static void RebuildObserversCustom(NetworkIdentity identity, bool initialize)
newObservers.Add(identity.connectionToClient); newObservers.Add(identity.connectionToClient);
} }
// TODO cap // cap to maxObservers before handling added/removed.
// this is 100% safe and allows us to limit local world size
// without worrying about observers+fitted observers for Rpcs etc.
newObservers.Trim(maxObservers);
bool changed = false; bool changed = false;