diff --git a/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs b/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs index f513e8d..351d593 100644 --- a/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs +++ b/MiraAPI.Example/GameOver/NeutralKillerGameOver.cs @@ -7,9 +7,9 @@ namespace MiraAPI.Example.GameOver; public class NeutralKillerGameOver : CustomGameOver { - public override bool VerifyCondition(PlayerControl playerControl) + public override bool VerifyCondition(PlayerControl playerControl, NetworkedPlayerInfo[] winners) { - return playerControl.Data.Role is NeutralKillerRole; + return winners is [{ Role: NeutralKillerRole }]; } public override void AfterEndGameSetup(EndGameManager endGameManager) diff --git a/MiraAPI/Networking/CustomGameOverRpc.cs b/MiraAPI/Networking/CustomGameOverRpc.cs index 978b992..34dbe6a 100644 --- a/MiraAPI/Networking/CustomGameOverRpc.cs +++ b/MiraAPI/Networking/CustomGameOverRpc.cs @@ -48,7 +48,7 @@ public class CustomGameOverRpc(MiraApiPlugin plugin, uint id) : PlayerCustomRpc< { if (GameOverManager.TryGetGameOver(data.Reason, out var gameOver)) { - if (!gameOver.VerifyCondition(innerNetObject)) + if (!gameOver.VerifyCondition(innerNetObject, [.. data.Winners])) { Logger.Info($"Game over condition not met for {gameOver.GetType().Name}"); return;