From 45e886e2c4024bff24e2befc5acd5602fc7765f7 Mon Sep 17 00:00:00 2001 From: rodolphito Date: Sun, 3 Mar 2019 23:44:27 -0800 Subject: [PATCH] Removed one liner braces in NetworkIdentity. (#546) --- Assets/Mirror/Runtime/NetworkIdentity.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 14dab4f54..1ed98dcb1 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -245,7 +245,7 @@ internal void OnStartServer(bool allowNonZeroNetId) } } - if (LogFilter.Debug) { Debug.Log("OnStartServer " + this + " GUID:" + netId); } + if (LogFilter.Debug) Debug.Log("OnStartServer " + this + " GUID:" + netId); // add to spawned (note: the original EnableIsServer isn't needed // because we already set m_isServer=true above) @@ -280,7 +280,7 @@ internal void OnStartClient() { isClient = true; - if (LogFilter.Debug) { Debug.Log("OnStartClient " + gameObject + " GUID:" + netId + " localPlayerAuthority:" + localPlayerAuthority); } + if (LogFilter.Debug) Debug.Log("OnStartClient " + gameObject + " GUID:" + netId + " localPlayerAuthority:" + localPlayerAuthority); foreach (NetworkBehaviour comp in NetworkBehaviours) { try @@ -396,7 +396,7 @@ internal bool OnSerializeSafely(NetworkBehaviour comp, NetworkWriter writer, boo writer.Write(endPosition - contentPosition); writer.Position = endPosition; - if (LogFilter.Debug) { Debug.Log("OnSerializeSafely written for object=" + comp.name + " component=" + comp.GetType() + " sceneId=" + m_SceneId + "header@" + headerPosition + " content@" + contentPosition + " end@" + endPosition + " contentSize=" + (endPosition - contentPosition)); } + if (LogFilter.Debug) Debug.Log("OnSerializeSafely written for object=" + comp.name + " component=" + comp.GetType() + " sceneId=" + m_SceneId + "header@" + headerPosition + " content@" + contentPosition + " end@" + endPosition + " contentSize=" + (endPosition - contentPosition)); return result; } @@ -432,7 +432,7 @@ internal byte[] OnSerializeAllSafely(bool initialState) if (initialState || comp.IsDirty()) { // serialize the data - if (LogFilter.Debug) { Debug.Log("OnSerializeAllSafely: " + name + " -> " + comp.GetType() + " initial=" + initialState); } + if (LogFilter.Debug) Debug.Log("OnSerializeAllSafely: " + name + " -> " + comp.GetType() + " initial=" + initialState); OnSerializeSafely(comp, onSerializeWriter, initialState); // Clear dirty bits only if we are synchronizing data and not sending a spawn message. @@ -472,7 +472,7 @@ internal void OnDeserializeSafely(NetworkBehaviour comp, NetworkReader reader, b // read content byte[] bytes = reader.ReadBytes(contentSize); - if (LogFilter.Debug) { Debug.Log("OnDeserializeSafely extracted: " + comp.name + " component=" + comp.GetType() + " sceneId=" + m_SceneId + " length=" + bytes.Length); } + if (LogFilter.Debug) Debug.Log("OnDeserializeSafely extracted: " + comp.name + " component=" + comp.GetType() + " sceneId=" + m_SceneId + " length=" + bytes.Length); // call OnDeserialize with a temporary reader, so that the // original one can't be messed with. we also wrap it in a @@ -639,7 +639,7 @@ internal void AddObserver(NetworkConnection conn) return; } - if (LogFilter.Debug) { Debug.Log("Added observer " + conn.address + " added for " + gameObject); } + if (LogFilter.Debug) Debug.Log("Added observer " + conn.address + " added for " + gameObject); observers[conn.connectionId] = conn; conn.AddToVisList(this); @@ -706,7 +706,7 @@ public void RebuildObservers(bool initialize) { // new observer conn.AddToVisList(this); - if (LogFilter.Debug) { Debug.Log("New Observer for " + gameObject + " " + conn); } + if (LogFilter.Debug) Debug.Log("New Observer for " + gameObject + " " + conn); changed = true; } } @@ -717,7 +717,7 @@ public void RebuildObservers(bool initialize) { // removed observer conn.RemoveFromVisList(this, false); - if (LogFilter.Debug) { Debug.Log("Removed Observer for " + gameObject + " " + conn); } + if (LogFilter.Debug) Debug.Log("Removed Observer for " + gameObject + " " + conn); changed = true; } }