From 86c194231032fe8373edc80e256ca46654c62659 Mon Sep 17 00:00:00 2001 From: rodolphito Date: Wed, 27 Mar 2019 04:03:37 -0700 Subject: [PATCH] Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. (#667) --- Assets/Mirror/Runtime/ClientScene.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/Mirror/Runtime/ClientScene.cs b/Assets/Mirror/Runtime/ClientScene.cs index 970a22843..2918f6843 100644 --- a/Assets/Mirror/Runtime/ClientScene.cs +++ b/Assets/Mirror/Runtime/ClientScene.cs @@ -9,9 +9,9 @@ namespace Mirror { public static class ClientScene { - static bool s_IsSpawnFinished; + static bool isSpawnFinished; - static HashSet s_PendingOwnerNetIds = new HashSet(); + static HashSet pendingOwnerNetIds = new HashSet(); public static NetworkIdentity localPlayer { get; private set; } public static bool ready { get; internal set; } @@ -31,11 +31,11 @@ internal static void Shutdown() { NetworkIdentity.spawned.Clear(); ClearSpawners(); - s_PendingOwnerNetIds.Clear(); + pendingOwnerNetIds.Clear(); spawnableObjects = null; readyConnection = null; ready = false; - s_IsSpawnFinished = false; + isSpawnFinished = false; Transport.activeTransport.ClientDisconnect(); } @@ -351,7 +351,7 @@ static void ApplySpawnPayload(NetworkIdentity identity, Vector3 position, Quater NetworkIdentity.spawned[netId] = identity; // objects spawned as part of initial state are started on a second pass - if (s_IsSpawnFinished) + if (isSpawnFinished) { identity.isClient = true; identity.OnStartClient(); @@ -450,7 +450,7 @@ internal static void OnObjectSpawnStarted(NetworkConnection conn, ObjectSpawnSta if (LogFilter.Debug) Debug.Log("SpawnStarted"); PrepareToSpawnSceneObjects(); - s_IsSpawnFinished = false; + isSpawnFinished = false; } internal static void OnObjectSpawnFinished(NetworkConnection conn, ObjectSpawnFinishedMessage msg) @@ -468,7 +468,7 @@ internal static void OnObjectSpawnFinished(NetworkConnection conn, ObjectSpawnFi CheckForOwner(identity); } } - s_IsSpawnFinished = true; + isSpawnFinished = true; } internal static void OnObjectHide(NetworkConnection conn, ObjectHideMessage msg) @@ -609,13 +609,13 @@ internal static void OnOwnerMessage(NetworkConnection conn, OwnerMessage msg) } else { - s_PendingOwnerNetIds.Add(msg.netId); + pendingOwnerNetIds.Add(msg.netId); } } static void CheckForOwner(NetworkIdentity identity) { - if (s_PendingOwnerNetIds.Contains(identity.netId)) + if (pendingOwnerNetIds.Contains(identity.netId)) { // found owner, turn into a local player @@ -631,7 +631,7 @@ static void CheckForOwner(NetworkIdentity identity) } InternalAddPlayer(identity); - s_PendingOwnerNetIds.Remove(identity.netId); + pendingOwnerNetIds.Remove(identity.netId); } } }