* Fix error

* move lookupattachment

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
This commit is contained in:
Astralcircle 2024-12-30 12:07:07 +03:00 committed by GitHub
parent 656c2556a6
commit f8b50d70bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,8 +22,6 @@ function SWEP:Setup(ply)
self.Attach = attachmentIndex
end
end
self.WAttach = self:LookupAttachment("muzzle")
end
function SWEP:Initialize()
@ -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()