unsilly recoil in pause

This commit is contained in:
Darsu 2025-03-02 00:59:14 +07:00
parent f5457f42ab
commit 3152f5acd3

View File

@ -181,13 +181,14 @@ do
MAGIC2 = 210 / (engine.TickInterval() / 0.015) MAGIC2 = 210 / (engine.TickInterval() / 0.015)
end end
if CLIENT and RealFrameTime() > 0.09 then -- super lag detected, clamping recoil local ft = CLIENT and RealFrameTime() or FrameTime()
if ft == 0 then return end -- game is paused
if CLIENT and ft > 0.09 then -- super lag detected, clamping recoil
MAGIC1 = 0.1 MAGIC1 = 0.1
MAGIC2 = 0.1 MAGIC2 = 0.1
end end
local ft = FrameTime()
local springconstant = swepGetProcessedValue(self, "VisualRecoilDampingConst", true) or 120 local springconstant = swepGetProcessedValue(self, "VisualRecoilDampingConst", true) or 120
local springmagnitude = swepGetProcessedValue(self, "VisualRecoilSpringMagnitude", true) or 1 local springmagnitude = swepGetProcessedValue(self, "VisualRecoilSpringMagnitude", true) or 1
local springdamping = swepGetProcessedValue(self, "VisualRecoilSpringPunchDamping", true) or 6 local springdamping = swepGetProcessedValue(self, "VisualRecoilSpringPunchDamping", true) or 6