From 1d49d7fb019e900387c49be728a223e40c583570 Mon Sep 17 00:00:00 2001 From: Malivil Date: Sat, 4 Apr 2026 17:15:10 -0400 Subject: [PATCH] Fixed role selection predicates being ignored by the role pack selection logic --- RELEASE.md | 1 + gamemodes/terrortown/gamemode/rolepacks.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 00de1e59a..81aac0197 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -23,6 +23,7 @@ - Fixed detective hats not hiding when the owning player was eaten by the Cannibal - Fixed Loot Goblin not being able to drop some weapons that were droppable - Fixed errors in shop with weapons that don't use the TTT base weapon (like the holdable cat) +- Fixed role selection predicates being ignored by the role pack selection logic - Ported "Add check for checking weapon GetHeadshotMultiplier" ### Developer diff --git a/gamemodes/terrortown/gamemode/rolepacks.lua b/gamemodes/terrortown/gamemode/rolepacks.lua index 8f210bd97..80e88d43e 100644 --- a/gamemodes/terrortown/gamemode/rolepacks.lua +++ b/gamemodes/terrortown/gamemode/rolepacks.lua @@ -604,8 +604,8 @@ function ROLEPACKS.AssignRoles(choices) end if not allowDuplicates and TableHasValue(chosenRoles, role) then continue end - if blockedRoles[role] then continue end + if ROLE_SELECTION_PREDICATE[role] and not ROLE_SELECTION_PREDICATE[role]() then continue end for _ = 1, roleslot.weight do TableInsert(possibleRoles, role)