From 3152f5acd370e59580a1b0a3255b2f1aab24db7e Mon Sep 17 00:00:00 2001 From: Darsu <95997959+dar-su@users.noreply.github.com> Date: Sun, 2 Mar 2025 00:59:14 +0700 Subject: [PATCH] unsilly recoil in pause --- lua/weapons/arc9_base/sh_recoil.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/weapons/arc9_base/sh_recoil.lua b/lua/weapons/arc9_base/sh_recoil.lua index 2ac5c775..3d1b0ce0 100644 --- a/lua/weapons/arc9_base/sh_recoil.lua +++ b/lua/weapons/arc9_base/sh_recoil.lua @@ -181,13 +181,14 @@ do MAGIC2 = 210 / (engine.TickInterval() / 0.015) 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 MAGIC2 = 0.1 end - - local ft = FrameTime() - + local springconstant = swepGetProcessedValue(self, "VisualRecoilDampingConst", true) or 120 local springmagnitude = swepGetProcessedValue(self, "VisualRecoilSpringMagnitude", true) or 1 local springdamping = swepGetProcessedValue(self, "VisualRecoilSpringPunchDamping", true) or 6