From 88dc337d397da36d7d3d8fbc0dad5dcb20c8816d Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 6 Sep 2021 20:27:41 +0100 Subject: [PATCH] Fix #220 Due to a race condition players can always win this boss. We should be referring to their status rather than alive state as this will be more reliable. --- src/scripting/AS-MicroTF2.sp | 2 +- src/scripting/Bossgames/Bossgame8.sp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripting/AS-MicroTF2.sp b/src/scripting/AS-MicroTF2.sp index 3021e316..79f48446 100644 --- a/src/scripting/AS-MicroTF2.sp +++ b/src/scripting/AS-MicroTF2.sp @@ -28,7 +28,7 @@ //#define DEBUG //#define LOGGING_STARTUP -#define PLUGIN_VERSION "5.0.0" +#define PLUGIN_VERSION "5.0.1" #define PLUGIN_PREFIX "\x0700FFFF[ \x07FFFF00WarioWare \x0700FFFF] {default}" #define PLUGIN_MAPPREFIX "warioware_redux_" diff --git a/src/scripting/Bossgames/Bossgame8.sp b/src/scripting/Bossgames/Bossgame8.sp index f0df7121..6df94417 100644 --- a/src/scripting/Bossgames/Bossgame8.sp +++ b/src/scripting/Bossgames/Bossgame8.sp @@ -282,7 +282,7 @@ public void Bossgame8_OnMinigameFinish() { Player player = new Player(i); - if (player.IsValid && player.IsParticipating && player.IsAlive) + if (player.IsValid && player.IsParticipating && player.Status == PlayerStatus_NotWon) { player.Status = PlayerStatus_Winner; }