removing 2nd null check (#2128)

if identity is not null then the game object is also not null
This commit is contained in:
James Frowen 2020-08-05 11:08:20 +01:00 committed by GitHub
parent 2b6a1bb792
commit 17838c5b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,9 +506,10 @@ public static void Update()
// update all server objects
foreach (KeyValuePair<uint, NetworkIdentity> kvp in NetworkIdentity.spawned)
{
if (kvp.Value != null && kvp.Value.gameObject != null)
NetworkIdentity identity = kvp.Value;
if (identity != null)
{
kvp.Value.ServerUpdate();
identity.ServerUpdate();
}
else
{