Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TTT: Force all players to innocents on preparing #1280
This change would break the role selection when the round begins. See https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/init.lua#L853
Perhaps an alternative fix would be to change ttt_logic_role to consider every player to be innocent if the round is preparing.
local activator_role = (GetRoundState() == ROUND_PREP) and ROLE_INNOCENT or activator:GetRole()
local activator_role = (GetRoundState() != ROUND_ACTIVE) and ROLE_INNOCENT or activator:GetRole()
So that waiting, preparing and finished round states are all taken into account, instead of just preparing.
(excuse my posting this as a 'changes' review, clicked the wrong thing)
@Faerachnidendro We don't actually want the finished/post-round phase to be handled the same way. Players who were traitor during the round should still be able to operate e.g. traitor-only doors in the post-round phase. That's why I specifically suggested the check on prep. Ideally it would be a check for waiting or prep, but that makes it more involved for very little benefit (during waiting everyone should be spectator'd anyway).