From 081f10f9c33b0062119085da5fc1aa74c7f9f9e1 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Tue, 8 Feb 2022 03:55:32 -0500 Subject: [PATCH] improve checkposmodifiers performance --- main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index 6eaca9b0..6b2d18df 100644 --- a/main.lua +++ b/main.lua @@ -929,13 +929,16 @@ local function checkStartOfRunWarnings() end end +-- Check our position modifiers based on HUD offset and character choice local function checkPosModifiers() - -- HUD offset adjustment + -- HUD offset adjustment, done every frame so it looks nice while changing the option if Options then EID:addTextPosModifier("HudOffset", Vector(((Options.HUDOffset * 10) * 2) - 20, (Options.HUDOffset * 10) - 10)) else EID:addTextPosModifier("HudOffset", Vector((EID.Config["HUDOffset"] * 2) - 20, EID.Config["HUDOffset"] - 10)) end + -- the other modifiers don't need to be ran as frequently + if EID.GameRenderCount % 30 ~= 0 then return end -- Greed Mode small right adjustment if game:IsGreedMode() then EID:addTextPosModifier("Greed Mode Horizontal", Vector(8,0))