Skip to content

Commit

Permalink
fix: smell cleanup left if bug. repaired with parenthesis. (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
uweeby committed Jul 14, 2020
1 parent f15c8bf commit dd52be3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Assets/Mirror/Runtime/NetworkIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,14 +1015,14 @@ public void RebuildObservers(bool initialize)
{
// only add ready connections.
// otherwise the player might not be in the world yet or anymore
if (conn != null && conn.IsReady && initialize || !observers.Contains(conn))
if (conn != null && conn.IsReady && (initialize || !observers.Contains(conn)))
{
// new observer
conn.AddToVisList(this);
// spawn identity for this conn
Server.ShowForConnection(this, conn);
if (logger.LogEnabled()) logger.Log("New Observer for " + gameObject + " " + conn);
changed = true;
// new observer
conn.AddToVisList(this);
// spawn identity for this conn
Server.ShowForConnection(this, conn);
if (logger.LogEnabled()) logger.Log("New Observer for " + gameObject + " " + conn);
changed = true;
}
}

Expand Down

0 comments on commit dd52be3

Please sign in to comment.