Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. (#667)

This commit is contained in:
rodolphito 2019-03-27 04:03:37 -07:00 committed by vis2k
parent 595039865f
commit 86c1942310

View File

@ -9,9 +9,9 @@ namespace Mirror
{ {
public static class ClientScene public static class ClientScene
{ {
static bool s_IsSpawnFinished; static bool isSpawnFinished;
static HashSet<uint> s_PendingOwnerNetIds = new HashSet<uint>(); static HashSet<uint> pendingOwnerNetIds = new HashSet<uint>();
public static NetworkIdentity localPlayer { get; private set; } public static NetworkIdentity localPlayer { get; private set; }
public static bool ready { get; internal set; } public static bool ready { get; internal set; }
@ -31,11 +31,11 @@ internal static void Shutdown()
{ {
NetworkIdentity.spawned.Clear(); NetworkIdentity.spawned.Clear();
ClearSpawners(); ClearSpawners();
s_PendingOwnerNetIds.Clear(); pendingOwnerNetIds.Clear();
spawnableObjects = null; spawnableObjects = null;
readyConnection = null; readyConnection = null;
ready = false; ready = false;
s_IsSpawnFinished = false; isSpawnFinished = false;
Transport.activeTransport.ClientDisconnect(); Transport.activeTransport.ClientDisconnect();
} }
@ -351,7 +351,7 @@ static void ApplySpawnPayload(NetworkIdentity identity, Vector3 position, Quater
NetworkIdentity.spawned[netId] = identity; NetworkIdentity.spawned[netId] = identity;
// objects spawned as part of initial state are started on a second pass // objects spawned as part of initial state are started on a second pass
if (s_IsSpawnFinished) if (isSpawnFinished)
{ {
identity.isClient = true; identity.isClient = true;
identity.OnStartClient(); identity.OnStartClient();
@ -450,7 +450,7 @@ internal static void OnObjectSpawnStarted(NetworkConnection conn, ObjectSpawnSta
if (LogFilter.Debug) Debug.Log("SpawnStarted"); if (LogFilter.Debug) Debug.Log("SpawnStarted");
PrepareToSpawnSceneObjects(); PrepareToSpawnSceneObjects();
s_IsSpawnFinished = false; isSpawnFinished = false;
} }
internal static void OnObjectSpawnFinished(NetworkConnection conn, ObjectSpawnFinishedMessage msg) internal static void OnObjectSpawnFinished(NetworkConnection conn, ObjectSpawnFinishedMessage msg)
@ -468,7 +468,7 @@ internal static void OnObjectSpawnFinished(NetworkConnection conn, ObjectSpawnFi
CheckForOwner(identity); CheckForOwner(identity);
} }
} }
s_IsSpawnFinished = true; isSpawnFinished = true;
} }
internal static void OnObjectHide(NetworkConnection conn, ObjectHideMessage msg) internal static void OnObjectHide(NetworkConnection conn, ObjectHideMessage msg)
@ -609,13 +609,13 @@ internal static void OnOwnerMessage(NetworkConnection conn, OwnerMessage msg)
} }
else else
{ {
s_PendingOwnerNetIds.Add(msg.netId); pendingOwnerNetIds.Add(msg.netId);
} }
} }
static void CheckForOwner(NetworkIdentity identity) static void CheckForOwner(NetworkIdentity identity)
{ {
if (s_PendingOwnerNetIds.Contains(identity.netId)) if (pendingOwnerNetIds.Contains(identity.netId))
{ {
// found owner, turn into a local player // found owner, turn into a local player
@ -631,7 +631,7 @@ static void CheckForOwner(NetworkIdentity identity)
} }
InternalAddPlayer(identity); InternalAddPlayer(identity);
s_PendingOwnerNetIds.Remove(identity.netId); pendingOwnerNetIds.Remove(identity.netId);
} }
} }
} }