1
0
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:
Python1320 2023-09-25 11:48:22 +03:00 committed by GitHub
parent 929ee26705
commit 8a46cc363d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View 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"

View File

@ -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)