diff --git a/plugins/stamina/sh_plugin.lua b/plugins/stamina/sh_plugin.lua index 709a16938..ff4d154c9 100644 --- a/plugins/stamina/sh_plugin.lua +++ b/plugins/stamina/sh_plugin.lua @@ -63,7 +63,6 @@ local function CalcStaminaChange(client) client:SetLocalVar("stm", value) if (value == 0 and !client:GetNetVar("brth", false)) then - client:SetRunSpeed(walkSpeed) client:SetNetVar("brth", true) character:UpdateAttrib("end", 0.1) @@ -71,7 +70,6 @@ local function CalcStaminaChange(client) hook.Run("PlayerStaminaLost", client) elseif (value >= 50 and client:GetNetVar("brth", false)) then - client:SetRunSpeed(runSpeed) client:SetNetVar("brth", nil) hook.Run("PlayerStaminaGained", client) @@ -80,6 +78,11 @@ local function CalcStaminaChange(client) end end +function PLUGIN:SetupMove(client, mv, cmd) + if (client:GetNetVar("brth", false)) then + mv:SetMaxClientSpeed(client:GetWalkSpeed()) + end +end if (SERVER) then function PLUGIN:PostPlayerLoadout(client)