File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
gamemodes/terrortown/gamemode/client Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
1212- Updated Russian and English localization files (by @Satton2 )
1313- Updated the list of troublesome addons used by the addonchecker
1414
15+ ### Fixed
16+
17+ - Fixed players sometimes being revealed as dead when they chat/voicechat right as they die (Facepunch/garrysmod/pull/2229, by @wgetJane )
18+
1519## [ v0.14.2b] ( https://github.com/TTT-2/TTT2/tree/v0.14.2b ) (2025-02-02)
1620
1721### Fixed
Original file line number Diff line number Diff line change @@ -55,6 +55,24 @@ local function TTT_RoleChat()
5555end
5656net .Receive (" TTT_RoleChat" , TTT_RoleChat )
5757
58+ --
59+ -- Returns the color for the given entity's team.
60+ -- @param Entity ent The @{Entity}
61+ -- @hook
62+ -- @realm client
63+ -- @ref https://wiki.facepunch.com/gmod/GM:GetTeamColor
64+ -- @local
65+ function GM :GetTeamColor (ent )
66+ -- don't reveal that a player has died when they happen to chat or voicechat at the moment of death
67+ if ent :IsPlayer () and ent :IsSpec () and ScoreGroup (ent ) == GROUP_NOTFOUND then
68+ --
69+ -- @realm client
70+ return hook .Run (" GetTeamNumColor" , TEAM_TERROR )
71+ end
72+
73+ return BaseClass .GetTeamColor (self , ent )
74+ end
75+
5876---
5977-- Called when a message is printed to the chat box. Note, that this isn't
6078-- working with @{Player} messages even though there are arguments for it.<br />
You can’t perform that action at this time.
0 commit comments