From 9ab80dc97121cf71ace94ad16dd9e99387ed7c5d Mon Sep 17 00:00:00 2001 From: Malivil Date: Tue, 11 Aug 2026 20:07:04 -0400 Subject: [PATCH] Fixed error causing rounds to not end when the Cannibal should have won --- RELEASE.md | 1 + gamemodes/terrortown/gamemode/roles/cannibal/cannibal.lua | 2 ++ 2 files changed, 3 insertions(+) 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