added transfer ownership, limit buffered events

This commit is contained in:
2023-07-01 07:47:57 +03:00
parent 20662ae24d
commit 105457ffa0
24 changed files with 134 additions and 108 deletions
+5 -3
View File
@@ -71,13 +71,15 @@ public sealed class RagonPlayerCache
}
}
public void OnOwnershipChanged(string playerId)
public void OnOwnershipChanged(ushort playerPeerId)
{
foreach (var player in _players)
{
if (player.Id == playerId)
if (player.PeerId == playerPeerId)
{
Owner = player;
player.IsRoomOwner = player.Id == playerId;
Owner.IsRoomOwner = true;
}
}
}