mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Added comments for OnRebuildObservers return value and adjusted NetworkProximityChecker to make this less weird.
This commit is contained in:
parent
3f9a423258
commit
6f3a7d7c64
@ -571,6 +571,8 @@ public virtual void OnStopAuthority()
|
||||
{
|
||||
}
|
||||
|
||||
// return true when overwriting so that Mirror knows that we wanted to
|
||||
// rebuild observers ourselves. otherwise it uses built in rebuild.
|
||||
public virtual bool OnRebuildObservers(HashSet<NetworkConnection> observers, bool initialize)
|
||||
{
|
||||
return false;
|
||||
|
@ -56,6 +56,8 @@ public override bool OnCheckObserver(NetworkConnection newObserver)
|
||||
return false;
|
||||
}
|
||||
|
||||
// return true when overwriting so that Mirror knows that we wanted to
|
||||
// rebuild observers ourselves. otherwise it uses built in rebuild.
|
||||
public override bool OnRebuildObservers(HashSet<NetworkConnection> observers, bool initial)
|
||||
{
|
||||
if (forceHidden)
|
||||
@ -87,7 +89,7 @@ public override bool OnRebuildObservers(HashSet<NetworkConnection> observers, bo
|
||||
observers.Add(uv.connectionToClient);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
case CheckMethod.Physics2D:
|
||||
@ -105,10 +107,11 @@ public override bool OnRebuildObservers(HashSet<NetworkConnection> observers, bo
|
||||
observers.Add(uv.connectionToClient);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// called hiding and showing objects on the host
|
||||
|
Loading…
Reference in New Issue
Block a user