fix fuzzy_stripey missing segment when dy > 0

also makes it try harder to approach the target weight, by default
This commit is contained in:
Kistaro Windrider 2024-02-11 18:30:48 -08:00
parent dca00e4fb6
commit fa9b6939cf
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -517,7 +517,7 @@ fuzzy = {
p = 0xffff,
n = 0,
interval = 3,
tries = 2,
tries = 4,
}
mknew(fuzzy, function(x)
local p = (x.p or fuzzy.p) & 0xffff
@ -578,7 +578,7 @@ function fuzzy_stripey:update()
fz.tries = self.tries
self.y += self.dy
if (self.y <= -self.gap) self.y += self.gap
if (self.y >= self.gap) self.y -= self.gap
if (self.y >= 0) self.y -= self.gap
fz:update()
end