fix moving condition with no monkeyspeed available

This commit is contained in:
Jrc13245
2026-02-14 21:29:15 -05:00
parent dae56dbb16
commit 8b1aaf1f87
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -2590,8 +2590,8 @@ function CleveRoids.IsPlayerMoving()
-- prevIdx and currIdx walk from oldest to newest
local currOffset = samplesAvail - i -- e.g., 3,2,1,0 for count=4
local prevOffset = samplesAvail - i + 1 -- e.g., 4,3,2,1
local currIdx = math.mod((headIdx - currOffset - 1), 4) + 1
local prevIdx = math.mod((headIdx - prevOffset - 1), 4) + 1
local currIdx = math.mod((headIdx - currOffset - 1 + 4), 4) + 1
local prevIdx = math.mod((headIdx - prevOffset - 1 + 4), 4) + 1
local prev = history[prevIdx]
local curr = history[currIdx]
local dx = curr.x - prev.x
+1 -1
View File
@@ -3862,7 +3862,7 @@ function CleveRoids.OnUpdate(self)
-- Maintain legacy vars for any code that uses them directly
if CleveRoids._posHistoryCount >= 2 then
local prevIdx = math.mod((idx - 2), 4) + 1
local prevIdx = math.mod((idx - 2 + 4), 4) + 1
CleveRoids._previousPlayerPos = history[prevIdx]
CleveRoids._currentPlayerPos = entry
end