Merge pull request #92 from 1darky/patch-4

Laser fix in ironsights in vehicles
This commit is contained in:
Fesiug 2022-01-04 02:42:27 -05:00 committed by GitHub
commit 1e13199bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ function SWEP:DrawLaser(laser, model, color, world)
dir = ang:Forward()
local eyeang = self:GetOwner():EyeAngles() - self:GetOurViewPunchAngles() + self:GetFreeAimOffset()
local eyeang = EyeAngles() - self:GetOurViewPunchAngles() + self:GetFreeAimOffset()
local canlaser = self:GetCurrentFiremode().Mode != 0 and !self:GetReloading() and self:BarrelHitWall() <= 0
delta = Lerp(0, delta, canlaser and self:GetSightDelta() or 1)
@ -121,7 +121,7 @@ function SWEP:DrawLaser(laser, model, color, world)
-- local cheap = GetConVar("arccw_cheapscopes"):GetBool()
local punch = self:GetOurViewPunchAngles()
ang = self:GetOwner():EyeAngles() - punch + self:GetFreeAimOffset()
ang = EyeAngles() - punch + self:GetFreeAimOffset()
tracepos = EyePos() - Vector(0, 0, 1)
pos, dir = tracepos, ang:Forward()