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; return;
} }
m_IsServer = true; m_IsServer = true;
m_HasAuthority = !m_LocalPlayerAuthority;
if (m_LocalPlayerAuthority)
{
// local player on server has NO authority
m_HasAuthority = false;
}
else
{
// enemy on server has authority
m_HasAuthority = true;
}
m_Observers = new List<NetworkConnection>(); m_Observers = new List<NetworkConnection>();
m_ObserverConnections = new HashSet<int>(); m_ObserverConnections = new HashSet<int>();