Skip to content

Commit

Permalink
fix: #840 by allowing Mirror to respect the forceHidden flag (#893)
Browse files Browse the repository at this point in the history
* fix: #840 by allowing Mirror to respect the forceHidden flag on NetworkProximityChecker

* Update NetworkProximityChecker.cs
  • Loading branch information
gyststarblayze authored and miwarnec committed Jun 6, 2019
1 parent 9ff7fed commit 3ec3d02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Assets/Mirror/Components/NetworkProximityChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ 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)
{
Expand Down

0 comments on commit 3ec3d02

Please sign in to comment.