From 0b5922cc59834ca66e52bc12763bb35a0b70d317 Mon Sep 17 00:00:00 2001 From: AlmTech Date: Sat, 7 Sep 2019 17:55:41 +0200 Subject: [PATCH] Added voice chad proximity --- gamemode/core/server/sv_player_voice.lua | 10 ++++++++++ gamemode/settings/sv_settings.lua | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 gamemode/core/server/sv_player_voice.lua diff --git a/gamemode/core/server/sv_player_voice.lua b/gamemode/core/server/sv_player_voice.lua new file mode 100644 index 0000000..54aa767 --- /dev/null +++ b/gamemode/core/server/sv_player_voice.lua @@ -0,0 +1,10 @@ +-- __ _ _______ _ __ +-- / / /\ | | |__ __| | | \ \ +-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \ +-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > > +-- \ \ / ____ \| | | | | | | | __/ (__| | | | / / +-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ + +function GM:PlayerCanHearPlayersVoice( lis, talk ) + if( lis:GetPos():Distance( talk:GetPos() ) > Quantum.Server.Settings.VoiceChatRange ) then return false, true end +end \ No newline at end of file diff --git a/gamemode/settings/sv_settings.lua b/gamemode/settings/sv_settings.lua index 42d374d..f684dcc 100644 --- a/gamemode/settings/sv_settings.lua +++ b/gamemode/settings/sv_settings.lua @@ -7,6 +7,8 @@ Quantum.Server.Settings = {} +Quantum.Server.Settings.VoiceChatRange = 400 + Quantum.Server.Settings.DamageScale = { -- The scale of the damage for each hitgroup [HITGROUP_HEAD] = 4, [HITGROUP_CHEST] = 2,