Removed one liner braces in NetworkIdentity. (#546)

This commit is contained in:
rodolphito 2019-03-03 23:44:27 -08:00 committed by vis2k
parent a9deb56282
commit 45e886e2c4

View File

@ -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 // add to spawned (note: the original EnableIsServer isn't needed
// because we already set m_isServer=true above) // because we already set m_isServer=true above)
@ -280,7 +280,7 @@ internal void OnStartClient()
{ {
isClient = true; 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) foreach (NetworkBehaviour comp in NetworkBehaviours)
{ {
try try
@ -396,7 +396,7 @@ internal bool OnSerializeSafely(NetworkBehaviour comp, NetworkWriter writer, boo
writer.Write(endPosition - contentPosition); writer.Write(endPosition - contentPosition);
writer.Position = endPosition; 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; return result;
} }
@ -432,7 +432,7 @@ internal byte[] OnSerializeAllSafely(bool initialState)
if (initialState || comp.IsDirty()) if (initialState || comp.IsDirty())
{ {
// serialize the data // 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); OnSerializeSafely(comp, onSerializeWriter, initialState);
// Clear dirty bits only if we are synchronizing data and not sending a spawn message. // 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 // read content
byte[] bytes = reader.ReadBytes(contentSize); 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 // call OnDeserialize with a temporary reader, so that the
// original one can't be messed with. we also wrap it in a // original one can't be messed with. we also wrap it in a
@ -639,7 +639,7 @@ internal void AddObserver(NetworkConnection conn)
return; 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; observers[conn.connectionId] = conn;
conn.AddToVisList(this); conn.AddToVisList(this);
@ -706,7 +706,7 @@ public void RebuildObservers(bool initialize)
{ {
// new observer // new observer
conn.AddToVisList(this); 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; changed = true;
} }
} }
@ -717,7 +717,7 @@ public void RebuildObservers(bool initialize)
{ {
// removed observer // removed observer
conn.RemoveFromVisList(this, false); 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; changed = true;
} }
} }