Simplify authority assignment

This commit is contained in:
Paul Pacheco 2018-07-03 07:35:09 -05:00
parent d3f23f7f04
commit a6b62f1608

View File

@ -270,17 +270,7 @@ internal void OnStartServer(bool allowNonZeroNetId)
return;
}
m_IsServer = true;
if (m_LocalPlayerAuthority)
{
// local player on server has NO authority
m_HasAuthority = false;
}
else
{
// enemy on server has authority
m_HasAuthority = true;
}
m_HasAuthority = !m_LocalPlayerAuthority;
m_Observers = new List<NetworkConnection>();
m_ObserverConnections = new HashSet<int>();