fix errors

This commit is contained in:
Jrc13245
2026-02-09 22:24:52 -05:00
parent ec1075b9f4
commit eff56e56fc
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -3824,7 +3824,7 @@ function CleveRoids.OnUpdate(self)
end
-- Advance circular index (1-based, wraps at 4)
local idx = (CleveRoids._posHistoryIndex % 4) + 1
local idx = math.mod(CleveRoids._posHistoryIndex, 4) + 1
CleveRoids._posHistoryIndex = idx
-- Reuse existing entry (zero allocation)
@@ -3840,7 +3840,7 @@ function CleveRoids.OnUpdate(self)
-- Maintain legacy vars for any code that uses them directly
if CleveRoids._posHistoryCount >= 2 then
local prevIdx = ((idx - 2) % 4) + 1
local prevIdx = math.mod((idx - 2), 4) + 1
CleveRoids._previousPlayerPos = history[prevIdx]
CleveRoids._currentPlayerPos = entry
end