mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
refactor: Simplify nested if
This commit is contained in:
parent
548e9dff39
commit
e69c0976a2
@ -756,16 +756,12 @@ public virtual void OnClientSceneChanged(NetworkConnection conn)
|
|||||||
// always become ready.
|
// always become ready.
|
||||||
ClientScene.Ready(conn);
|
ClientScene.Ready(conn);
|
||||||
|
|
||||||
// vis2k: replaced all this weird code with something more simple
|
if (autoCreatePlayer && ClientScene.localPlayer == null)
|
||||||
if (autoCreatePlayer)
|
|
||||||
{
|
{
|
||||||
// add player if existing one is null
|
// add player if existing one is null
|
||||||
if (ClientScene.localPlayer == null)
|
|
||||||
{
|
|
||||||
ClientScene.AddPlayer();
|
ClientScene.AddPlayer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Start & Stop callbacks
|
#region Start & Stop callbacks
|
||||||
|
Loading…
Reference in New Issue
Block a user