mirror of
https://github.com/Earu/EasyChat.git
synced 2025-03-04 03:13:20 -05:00
Fix TTT traitor voice (#112)
This commit is contained in:
parent
929ee26705
commit
8a46cc363d
7
lua/easychat/modules/client/terrortown.lua
Normal file
7
lua/easychat/modules/client/terrortown.lua
Normal file
@ -0,0 +1,7 @@
|
||||
if gmod.GetGamemode().Name ~= "terrortown" then return "Terrortown Compat" end
|
||||
|
||||
hook.Add("ECVoiceHUD", "EasyChatModuleTerrortown", function()
|
||||
return false -- DISABLED: TTT Voice HUD affects traitor voice mode
|
||||
end)
|
||||
|
||||
return "Terrortown Compat"
|
@ -175,7 +175,7 @@ GAMEMODE.old_PlayerStartVoice = GAMEMODE.old_PlayerStartVoice or GAMEMODE.Player
|
||||
GAMEMODE.old_PlayerEndVoice = GAMEMODE.old_PlayerEndVoice or GAMEMODE.PlayerEndVoice
|
||||
|
||||
function GAMEMODE:PlayerStartVoice(ply)
|
||||
if EC_VOICE_HUD:GetBool() then
|
||||
if EC_VOICE_HUD:GetBool() and hook.Run("ECVoiceHUD",true) ~= false then
|
||||
player_start_voice(ply)
|
||||
else
|
||||
self:old_PlayerStartVoice(ply)
|
||||
@ -183,7 +183,7 @@ function GAMEMODE:PlayerStartVoice(ply)
|
||||
end
|
||||
|
||||
function GAMEMODE:PlayerEndVoice(ply)
|
||||
if EC_VOICE_HUD:GetBool() then
|
||||
if EC_VOICE_HUD:GetBool() and hook.Run("ECVoiceHUD",false) ~= false then
|
||||
player_end_voice(ply)
|
||||
else
|
||||
self:old_PlayerEndVoice(ply)
|
||||
|
Loading…
Reference in New Issue
Block a user