fix lingering stuff from a previous iteration

This commit is contained in:
2025-07-06 14:42:23 -07:00
parent ee24adf8b2
commit 797818214a

View File

@ -729,7 +729,7 @@ function segment:should_step(x, y)
ret = true ret = true
end end
if self.prev_x then if self.prev_x then
local dx0, dy0 = dest_x = self.prev_x - dest_x, self.prev_y - dest_y local dx0, dy0 = self.prev_x - dest_x, self.prev_y - dest_y
if dx1 * dx1 + dy1 * dy1 > dx0 * dx0 + dy0 * dy0 then if dx1 * dx1 + dy1 * dy1 > dx0 * dx0 + dy0 * dy0 then
if self.was_approaching then if self.was_approaching then
self.was_approaching = false self.was_approaching = false