fix: #840 by allowing Mirror to respect the forceHidden flag (#893)

* fix: #840 by allowing Mirror to respect the forceHidden flag on NetworkProximityChecker

* Update NetworkProximityChecker.cs
This commit is contained in:
gyststarblayze 2019-06-06 02:39:35 -04:00 committed by vis2k
parent 9ff7feda9a
commit 3ec3d02362

View File

@ -64,8 +64,11 @@ public override bool OnCheckObserver(NetworkConnection newObserver)
public override bool OnRebuildObservers(HashSet<NetworkConnection> observers, bool initial)
{
// if force hidden then return without adding any observers.
if (forceHidden)
return false;
// always return true when overwriting OnRebuildObservers so that
// Mirror knows not to use the built in rebuild method.
return true;
// find players within range
switch (checkMethod)