From 75d5cb180de63e990d31269bd48e8deb69ff4198 Mon Sep 17 00:00:00 2001 From: ZioPao Date: Sat, 12 Oct 2024 18:48:52 +0200 Subject: [PATCH] Fix to familiarity timing bug --- .../TOC/Controllers/LimitActionsController.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/media/lua/client/TOC/Controllers/LimitActionsController.lua b/media/lua/client/TOC/Controllers/LimitActionsController.lua index b65153d..282f61e 100644 --- a/media/lua/client/TOC/Controllers/LimitActionsController.lua +++ b/media/lua/client/TOC/Controllers/LimitActionsController.lua @@ -59,7 +59,17 @@ function ISBaseTimedAction:adjustMaxTime(maxTime) local perkLevelScaled if perkLevel ~= 0 then perkLevelScaled = perkLevel / 10 else perkLevelScaled = 0 end - time = time * (StaticData.LIMBS_TIME_MULTIPLIER_IND_NUM[limbName] - perkLevelScaled) + TOC_DEBUG.print("Perk Level: " .. tostring(perkLevel)) + TOC_DEBUG.print("OG time: " .. tostring(time)) + + -- Modified Time shouldn't EVER be lower compared to the og one. + local modifiedTime = time * (StaticData.LIMBS_TIME_MULTIPLIER_IND_NUM[limbName] - perkLevelScaled) + + if modifiedTime >= time then + time = modifiedTime + end + + --TOC_DEBUG.print("Modified time: " .. tostring(time)) end end