mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 03:40:54 +00:00
dont change owner if same owner
This commit is contained in:
parent
211bdacf16
commit
a6cdc10d3c
@ -84,9 +84,17 @@ namespace QSB.OrbSync.Events
|
||||
return;
|
||||
}
|
||||
|
||||
if (orbIdentity.ClientAuthorityOwner != null && orbIdentity.ClientAuthorityOwner != fromPlayer)
|
||||
var currentOwner = orbIdentity.ClientAuthorityOwner;
|
||||
var newOwner = fromPlayer;
|
||||
|
||||
if (currentOwner == newOwner)
|
||||
{
|
||||
orbIdentity.RemoveClientAuthority(orbIdentity.ClientAuthorityOwner);
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentOwner != null && currentOwner != fromPlayer)
|
||||
{
|
||||
orbIdentity.RemoveClientAuthority(currentOwner);
|
||||
}
|
||||
|
||||
orbIdentity.AssignClientAuthority(fromPlayer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user