diff --git a/RELEASE.md b/RELEASE.md index 4d938ae40..0bb25637a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,6 +15,7 @@ ### Fixes - Fixed players swallowed by the Cannibal still being able to trigger traitor traps - Fixed various roles erroring about unsupported hook 'TTTUpdateRoleState' +- Fixed error causing rounds to not end when the Cannibal should have won ### Developer - Added `TTTHUDInfoPositionOverride` hook to override the position of the player information HUD (role, health, ammo etc.) diff --git a/gamemodes/terrortown/gamemode/roles/cannibal/cannibal.lua b/gamemodes/terrortown/gamemode/roles/cannibal/cannibal.lua index e0220e6f3..dadf4e70e 100644 --- a/gamemodes/terrortown/gamemode/roles/cannibal/cannibal.lua +++ b/gamemodes/terrortown/gamemode/roles/cannibal/cannibal.lua @@ -28,6 +28,8 @@ CreateConVar("ttt_cannibal_notify_confetti", "0", FCVAR_NONE, "Whether to throw -------------------- local function ReleaseEatenPlayers(ply, message) + if GetRoundState() ~= ROUND_ACTIVE then return end + local cannibalSID64 = ply:SteamID64() for _, v in PlayerIterator() do if v.TTTCannibalEaten and v.TTTCannibalEaten == cannibalSID64 then