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.
|
||||
ClientScene.Ready(conn);
|
||||
|
||||
// vis2k: replaced all this weird code with something more simple
|
||||
if (autoCreatePlayer)
|
||||
if (autoCreatePlayer && ClientScene.localPlayer == null)
|
||||
{
|
||||
// add player if existing one is null
|
||||
if (ClientScene.localPlayer == null)
|
||||
{
|
||||
ClientScene.AddPlayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Start & Stop callbacks
|
||||
|
Loading…
Reference in New Issue
Block a user