mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkIdentity.GetNewObservers: result renamed to rebuildOverwritten because that's what it's for
This commit is contained in:
parent
15a47ca19c
commit
6eedd2405c
@ -973,17 +973,19 @@ internal void AddObserver(NetworkConnection conn)
|
||||
|
||||
// helper function to call OnRebuildObservers in all components
|
||||
// -> HashSet is passed in so we can cache it!
|
||||
// -> returns true if any of the components implemented
|
||||
// OnRebuildObservers, false otherwise
|
||||
internal bool GetNewObservers(HashSet<NetworkConnection> observersSet, bool initialize)
|
||||
{
|
||||
bool result = false;
|
||||
bool rebuildOverwritten = false;
|
||||
observersSet.Clear();
|
||||
|
||||
foreach (NetworkBehaviour comp in NetworkBehaviours)
|
||||
{
|
||||
result |= comp.OnRebuildObservers(observersSet, initialize);
|
||||
rebuildOverwritten |= comp.OnRebuildObservers(observersSet, initialize);
|
||||
}
|
||||
|
||||
return result;
|
||||
return rebuildOverwritten;
|
||||
}
|
||||
|
||||
static readonly HashSet<NetworkConnection> newObservers = new HashSet<NetworkConnection>();
|
||||
|
Loading…
Reference in New Issue
Block a user