mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
sway changes
This commit is contained in:
parent
3f252c22da
commit
09aec9eca6
@ -8,7 +8,6 @@ local hudconvar = GetConVar("arc9_breath_hud")
|
||||
local swayconvar = GetConVar("arc9_mod_sway")
|
||||
|
||||
function SWEP:ThinkHoldBreath()
|
||||
if !swayconvar:GetBool() then return end
|
||||
if !self:GetOwner():IsPlayer() then return end
|
||||
local holdbreathtime = self:GetValue("HoldBreathTime")
|
||||
if holdbreathtime <= 0 then return end
|
||||
@ -17,7 +16,7 @@ function SWEP:ThinkHoldBreath()
|
||||
|
||||
local target_ts = 1
|
||||
|
||||
if self:HoldingBreath() then
|
||||
if swayconvar:GetBool() and self:HoldingBreath() then
|
||||
self:SetBreath(self:GetBreath() - (FrameTime() * 100 / holdbreathtime))
|
||||
if self:GetBreath() < 0 then
|
||||
self:SetOutOfBreath(true)
|
||||
@ -100,7 +99,6 @@ local lastpressed = false
|
||||
SWEP.IsHoldingBreath = false
|
||||
|
||||
function SWEP:HoldingBreath()
|
||||
if !swayconvar:GetBool() then self.IsHoldingBreath = false return end
|
||||
if self:GetSightAmount() < 0.05 then self.IsHoldingBreath = false return end
|
||||
|
||||
local ownerkeydownspeed = self:GetOwner():KeyDown(IN_SPEED)
|
||||
@ -121,7 +119,6 @@ end
|
||||
local pp_amount = 0
|
||||
|
||||
function SWEP:HoldBreathPP()
|
||||
if !swayconvar:GetBool() then return end
|
||||
if self:GetValue("HoldBreathTime") <= 0 then return end
|
||||
if !ppconvar:GetBool() then return end
|
||||
local amt_d = (100 - self:GetBreath()) / 100
|
||||
@ -153,7 +150,6 @@ function SWEP:HoldBreathPP()
|
||||
end
|
||||
|
||||
function SWEP:HoldBreathHUD()
|
||||
if !swayconvar:GetBool() then return end
|
||||
if self:GetSightAmount() < 1 then return end
|
||||
if self:GetValue("HoldBreathTime") <= 0 then return end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user