This commit is contained in:
vis2k 2022-03-09 15:47:43 +08:00
parent 376494e7f5
commit 401074fc67

View File

@ -814,12 +814,16 @@ public static bool ReplacePlayerForConnection(NetworkConnectionToClient conn, Ga
Respawn(identity);
if (keepAuthority)
{
// This needs to be sent to clear isLocalPlayer on
// client while keeping hasAuthority true
SendChangeOwnerMessage(previousPlayer, conn);
}
else
{
// This clears both isLocalPlayer and hasAuthority on client
previousPlayer.RemoveClientAuthority();
}
return true;
}