fix: Don't give host player authority by default (#1158)

* Don't give host player authority by default

* Same when removing authority
This commit is contained in:
MrGadget 2019-10-20 12:01:00 -04:00 committed by vis2k
parent 9806e77718
commit 1fc1ed2708
2 changed files with 2 additions and 3 deletions

View File

@ -511,7 +511,6 @@ internal void OnStartServer(bool allowNonZeroNetId)
return;
}
m_IsServer = true;
hasAuthority = !localPlayerAuthority;
observers = new Dictionary<int, NetworkConnection>();
@ -1119,7 +1118,7 @@ public void RemoveClientAuthority()
}
// server now has authority (this is only called on server)
ForceAuthority(true);
ForceAuthority(false);
}
/// <summary>

View File

@ -1452,7 +1452,7 @@ public static bool SpawnObjects()
Spawn(identity.gameObject);
// these objects are server authority - even if "localPlayerAuthority" is set on them
identity.ForceAuthority(true);
identity.ForceAuthority(false);
}
}
return true;