fix: Added LogFilter.Debug check in a few places (#1575)

This commit is contained in:
MrGadget 2020-03-21 09:42:33 -04:00 committed by GitHub
parent 3f4f3c5c91
commit 3156504270
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -510,7 +510,7 @@ void FinishStartHost()
// loaded and all objects were spawned.
// DO NOT do this earlier. it would cause race conditions where a
// client will do things before the server is even fully started.
Debug.Log("StartHostClient called");
if (LogFilter.Debug) Debug.Log("StartHostClient called");
StartHostClient();
}
@ -871,12 +871,12 @@ void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
// TODO only respawn the server objects from that scene later!
NetworkServer.SpawnObjects();
Debug.Log("Respawned Server objects after additive scene load: " + scene.name);
if (LogFilter.Debug) Debug.Log("Respawned Server objects after additive scene load: " + scene.name);
}
if (NetworkClient.active)
{
ClientScene.PrepareToSpawnSceneObjects();
Debug.Log("Rebuild Client spawnableObjects after additive scene load: " + scene.name);
if (LogFilter.Debug) Debug.Log("Rebuild Client spawnableObjects after additive scene load: " + scene.name);
}
}
}
@ -926,7 +926,7 @@ void FinishLoadSceneHost()
{
// debug message is very important. if we ever break anything then
// it's very obvious to notice.
Debug.Log("Finished loading scene in host mode.");
if (LogFilter.Debug) Debug.Log("Finished loading scene in host mode.");
if (clientReadyConnection != null)
{
@ -984,7 +984,7 @@ void FinishLoadSceneClientOnly()
{
// debug message is very important. if we ever break anything then
// it's very obvious to notice.
Debug.Log("Finished loading scene in client-only mode.");
if (LogFilter.Debug) Debug.Log("Finished loading scene in client-only mode.");
if (clientReadyConnection != null)
{
@ -1006,7 +1006,7 @@ void FinishLoadSceneServerOnly()
{
// debug message is very important. if we ever break anything then
// it's very obvious to notice.
Debug.Log("Finished loading scene in server-only mode.");
if (LogFilter.Debug) Debug.Log("Finished loading scene in server-only mode.");
NetworkServer.SpawnObjects();
OnServerSceneChanged(networkSceneName);