Merged in paulpach/hlapi-community-edition-lag/conditional (pull request #25)

Simplify authority assignment
This commit is contained in:
Paul Pacheco 2018-07-09 10:30:25 +00:00 committed by vis2k
commit 0022da41d4

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>();