fix: leave player logic

This commit is contained in:
2022-08-21 00:15:07 +04:00
parent 9e16c53cad
commit 51c0482a40
+1 -1
View File
@@ -117,7 +117,7 @@ namespace Ragon.Core
Broadcast(_readyPlayers, sendData);
}
if (_allPlayers.Length > 0)
if (_allPlayers.Length > 0 && player.PeerId == _owner)
{
var nextOwnerId = _allPlayers[0];
_owner = nextOwnerId;