Skip to content

Commit

Permalink
Add cant fire state and reset lock on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
wrefgtzweve committed Dec 30, 2024
1 parent cc3b484 commit 3b55686
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/weapons/glide_homing_launcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ if CLIENT then
local AIM_ICON = "glide/aim_square.png"

local LOCKON_STATE_COLORS = {
[-1] = Color( 220, 220, 220, 100 ),
[0] = Color( 255, 255, 255 ),
[1] = Color( 255, 255, 255 ),
[2] = Color( 100, 255, 100 ),
Expand Down Expand Up @@ -346,6 +347,12 @@ function SWEP:UpdateTarget()

local t = CurTime()

if not self:CanAttack() then
self:SetLockTarget( NULL )
self:SetLockState( -1 )
return
end

if not user:KeyDown( IN_ATTACK2 ) then
self:SetLockTarget( NULL )
self:SetLockState( 0 )
Expand Down

0 comments on commit 3b55686

Please sign in to comment.