mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: NetworkIdentity.Reset resets isLocalPlayer AFTER the isLocalPlayer ClearLocalPlayer check. fixes a runtime UnSpawn test.
This commit is contained in:
parent
a23c01aa24
commit
accf843283
@ -1110,7 +1110,7 @@ internal void Reset()
|
||||
clientStarted = false;
|
||||
isClient = false;
|
||||
isServer = false;
|
||||
isLocalPlayer = false;
|
||||
//isLocalPlayer = false; <- cleared AFTER ClearLocalPlayer below!
|
||||
|
||||
netId = 0;
|
||||
connectionToServer = null;
|
||||
@ -1119,10 +1119,13 @@ internal void Reset()
|
||||
|
||||
ClearObservers();
|
||||
|
||||
// clear local player if it was the local player,
|
||||
// THEN reset isLocalPlayer AFTERWARDS
|
||||
if (isLocalPlayer)
|
||||
{
|
||||
NetworkClient.ClearLocalPlayer();
|
||||
}
|
||||
isLocalPlayer = false;
|
||||
}
|
||||
|
||||
// clear all component's dirty bits no matter what
|
||||
|
Loading…
Reference in New Issue
Block a user