mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
34 lines
833 B
Lua
34 lines
833 B
Lua
--[[
|
|
| This file was obtained through the combined efforts
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
|
|
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
|
|
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
|
--]]
|
|
|
|
local PLUGIN = PLUGIN;
|
|
|
|
PLUGIN.name = "Fix Duplicate Step Sound"
|
|
PLUGIN.author = "Fruity"
|
|
PLUGIN.description = "Fixes duplicate step sound while in third person."
|
|
|
|
if (CLIENT) then
|
|
function PLUGIN:EntityEmitSound(soundData)
|
|
if (ix.option.Get("thirdpersonEnabled")) then
|
|
if (!soundData.Entity:IsPlayer()) then
|
|
return;
|
|
end;
|
|
|
|
local soundName = soundData.OriginalSoundName;
|
|
local blockedSuffixes = { ".stepleft", ".stepright" };
|
|
|
|
for _, v in pairs(blockedSuffixes) do
|
|
if (soundName:utf8sub(-#v) == v) then
|
|
return false;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end |