Skip to content

Commit

Permalink
Merge pull request #246 from jiemo132/master
Browse files Browse the repository at this point in the history
  • Loading branch information
JetBoom authored Nov 25, 2023
2 parents 9e6de6b + fce24ca commit a6a8548
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ function SWEP:CanPrimaryAttack()
self:EmitSound("items/medshotno1.wav")

self:SetNextCharge(CurTime() + 0.75)
owner.NextMedKitUse = self:GetNextCharge()
return false
end

Expand All @@ -190,8 +189,9 @@ function SWEP:DrawHUD()
local wid, hei = 384, 16
local x, y = ScrW() - wid - 32, ScrH() - hei - 72
local texty = y - 4 - draw.GetFontHeight("ZSHUDFontSmall")
local owner = self:GetOwner()

local timeleft = self:GetNextCharge() - CurTime()
local timeleft = (owner.NextMedKitUse or self:GetNextCharge()) - CurTime()
if 0 < timeleft then
surface.SetDrawColor(5, 5, 5, 180)
surface.DrawRect(x, y, wid, hei)
Expand Down

0 comments on commit a6a8548

Please sign in to comment.