PeekingIsSight

This commit is contained in:
Darsu 2025-02-22 21:29:45 +07:00
parent e273bf82a2
commit 045426fe52
5 changed files with 9 additions and 8 deletions

View File

@ -82,7 +82,7 @@ function SWEP:GetSmoothedFOVMag()
end
sightdelta = math.ease.InOutQuad(sightdelta)
if self.Peeking then
if self.Peeking and !self.PeekingIsSight then
target = self.IronSights.Magnification * 0.95
end

View File

@ -134,7 +134,7 @@ function SWEP:AdjustMouseSensitivity()
mag = mag + (fov / (self:GetRTScopeFOV() or 90))
end
if self.Peeking then
if self.Peeking and !self.PeekingIsSight then
mag = magdef
end

View File

@ -332,7 +332,7 @@ local function ArcticBreadDarsuBob(self, pos, ang)
self.ViewModelNotOnGround = math.Approach(self.ViewModelNotOnGround, 1, ft / 0.1)
end
local sightamount = self:GetSightAmount() - (self.Peeking and 0.72 or 0.1)
local sightamount = self:GetSightAmount() - ((self.Peeking and !self.PeekingIsSight) and 0.72 or 0.1)
d = d * Lerp(sightamount, 1,0.03) * Lerp(ts, 1, 1.5)
mag = d * 2
@ -398,7 +398,7 @@ local function DarsuBob(self, pos, ang)
local owner = self:GetOwner()
local ft = FrameTime()
local velocityangle = owner:GetVelocity()
local sightamount = self:GetSightAmount() - (self.Peeking and 0.72 or 0)
local sightamount = self:GetSightAmount() - ((self.Peeking and !self.PeekingIsSight) and 0.72 or 0)
local sprintamount = self:GetSprintAmount()
local sharedmult = self:GetIsSprinting() and self:GetProcessedValue("BobSprintMult", true) or self:GetProcessedValue("BobWalkMult", true)

View File

@ -2,8 +2,8 @@ SWEP.ViewModelPos = Vector(0, 0, 0)
SWEP.ViewModelAng = Angle(0, 0, 0)
SWEP.VMZOffsetForCamera = 0
SWEP.BenchGunViewModelPos = Vector(0, 0, 0)
SWEP.BenchGunViewModelAng = Angle(0, 0, 0)
SWEP.BenchGunViewModelPos = nil
SWEP.BenchGunViewModelAng = nil
local lht = 0
local sht = 0
@ -511,7 +511,7 @@ function SWEP:GetViewModelPosition(pos, ang)
-- end
-- end
if arc9DevBenchGun:GetBool() then return self.BenchGunViewModelPos, self.BenchGunViewModelAng end
if arc9DevBenchGun:GetBool() and self.BenchGunViewModelPos then return self.BenchGunViewModelPos, self.BenchGunViewModelAng end
self.BenchGunViewModelPos = pos
self.BenchGunViewModelAng = ang

View File

@ -381,7 +381,8 @@ function SWEP:GetRTScopeFOV()
local realzoom = self:GetRealZoom(sights)
local ratio = (sights.atttbl.ScopeScreenRatio or 0.5) - (!self.ExtraSightDistanceNoRT and sights.ExtraSightDistance or 0) * 0.045
local ratio = ((sights.atttbl and sights.atttbl.ScopeScreenRatio or self.ScopeScreenRatio) or 0.5) - (!self.ExtraSightDistanceNoRT and sights.ExtraSightDistance or 0) * 0.045
if self.PeekingIsSight and self.Peeking then ratio = ratio + 0.2 end
local vmfovratio = arc9_cheapscopes:GetBool() and sights.Magnification or self:GetSmoothedFOVMag() -- sights.Magnification
local funnyfov = self:ScaleFOVByWidthRatio(self:GetOwner():GetFOV(), 1 / vmfovratio * ratio / 1.5 / realzoom)