From a6b62f160852fe69accd745f7d81c597d06dbb23 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Tue, 3 Jul 2018 07:35:09 -0500 Subject: [PATCH] Simplify authority assignment --- .../Runtime/NetworkIdentity.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Unity-Technologies-networking/Runtime/NetworkIdentity.cs b/Unity-Technologies-networking/Runtime/NetworkIdentity.cs index 6656b1b4a..b8977ca6b 100644 --- a/Unity-Technologies-networking/Runtime/NetworkIdentity.cs +++ b/Unity-Technologies-networking/Runtime/NetworkIdentity.cs @@ -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(); m_ObserverConnections = new HashSet();