Skip to content

Commit

Permalink
Fix error (#3235)
Browse files Browse the repository at this point in the history
* Fix error

* move lookupattachment

---------

Co-authored-by: thegrb93 <[email protected]>
  • Loading branch information
Astralcircle and thegrb93 authored Dec 30, 2024
1 parent 656c255 commit f8b50d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lua/weapons/laserpointer/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ function SWEP:Setup(ply)
self.Attach = attachmentIndex
end
end

self.WAttach = self:LookupAttachment("muzzle")
end

function SWEP:Initialize()
Expand All @@ -45,7 +43,7 @@ function SWEP:DrawWorldModel()
self:DrawModel()

if self:GetLaserEnabled() then
local att = self:GetAttachment(self.WAttach)
local att = self:GetAttachment(self:LookupAttachment("muzzle") or 0)
if not att then return end

local owner = self:GetOwner()
Expand Down

0 comments on commit f8b50d7

Please sign in to comment.