Skip to content

style: whitespace fixes #1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void Initialize()

// NetworkConfig properties
m_PlayerPrefabProperty = m_NetworkConfigProperty.FindPropertyRelative(nameof(NetworkConfig.PlayerPrefab));
m_ProtocolVersionProperty = m_NetworkConfigProperty.FindPropertyRelative("ProtocolVersion");
m_ProtocolVersionProperty = m_NetworkConfigProperty.FindPropertyRelative("ProtocolVersion");
m_NetworkTransportProperty = m_NetworkConfigProperty.FindPropertyRelative("NetworkTransport");
m_TickRateProperty = m_NetworkConfigProperty.FindPropertyRelative("TickRate");
m_ClientConnectionBufferTimeoutProperty = m_NetworkConfigProperty.FindPropertyRelative("ClientConnectionBufferTimeout");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public ulong GetConfig(bool cache = true)

using var buffer = PooledNetworkBuffer.Get();
using var writer = PooledNetworkWriter.Get(buffer);

writer.WriteUInt16Packed(ProtocolVersion);
writer.WriteString(NetworkConstants.PROTOCOL_VERSION);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ internal void SynchronizeNetworkObjects(ulong clientId)
// If we are the base scene, then we set the root scene index;
if (activeScene == scene)
{
if(!ValidateSceneBeforeLoading(sceneIndex, LoadSceneMode.Single))
if (!ValidateSceneBeforeLoading(sceneIndex, LoadSceneMode.Single))
{
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private void OnSceneLoaded(Scene scene, LoadSceneMode mode)

private bool VerifySceneBeforeLoading(int sceneIndex, string sceneName, LoadSceneMode loadSceneMode)
{
if(sceneName.StartsWith("InitTestScene"))
if (sceneName.StartsWith("InitTestScene"))
{
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void SceneManager_OnSceneEvent(SceneEvent sceneEvent)
}
else if (sceneEvent.SceneEventType == SceneEventData.SceneEventTypes.C2S_UnloadComplete)
{
if (sceneEvent.ClientId == NetworkManager.Singleton.ServerClientId && !m_SceneLoaded.isLoaded )
if (sceneEvent.ClientId == NetworkManager.Singleton.ServerClientId && !m_SceneLoaded.isLoaded)
{
m_SceneLoaded = new Scene();
m_WaitForSceneLoadOrUnload = false;
Expand Down Expand Up @@ -156,10 +156,10 @@ public IEnumerator SceneEventCoroutine()
switch (sceneEventProgressStatus)
{
case SceneEventProgressStatus.SceneEventInProgress:
{
yield return new WaitForSeconds(0.25f);
break;
}
{
yield return new WaitForSeconds(0.25f);
break;
}
case SceneEventProgressStatus.Started:
{
continueCheck = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override void OnNetworkSpawn()
s_Singleton = this;
}

if ( IsServer && NetworkManager.SceneManager != null)
if (IsServer && NetworkManager.SceneManager != null)
{
NetworkManager.SceneManager.OnSceneEvent += SceneManager_OnSceneEvent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void Move(int speed)
else if (!IsServer && IsOwner)
{
// Client must sent Rpc
MovePlayerServerRpc(m_Direction * speed*1.05f);
MovePlayerServerRpc(m_Direction * speed * 1.05f);
}
else if (IsServer && !IsOwner)
{
Expand Down