From f7170428c96a944e349db1be91d131fa5eabbe97 Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Sat, 17 Dec 2022 14:09:54 -0800 Subject: [PATCH] Attempts to make this fast keep breaking things --- chameleonic.p8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index 2863aca..d99a15d 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -677,8 +677,8 @@ function rope:drag( local anc=self:_anc(i()) local busy=self:busy() - for x,y in self:_rastn( - anc.x,anc.y,x,y,2,2 + for x,y in self:_rast( + anc.x,anc.y,x,y ) do local a=self:_anc(i()) if not (_point_eq(a,{x=x,y=y})) then @@ -799,8 +799,9 @@ function rope:_find_touched_anchors(i) for bx,by in self:_rast(a0.x,a0.y,a2.x,a2.y) do local a1=level:point_anchor(bx,by) - if a1!=nil and not _point_eq(a0,a1) and not _point_eq(a1,a2) - and _linedist(a0,a1,a2) < 0.01 + if + a1!=nil and not _point_eq(a0,a1) and not _point_eq(a1,a2) + and _linedist(a0,a1,a2) == 0.0 -- and self:_can_stretch(p,a2) then local id=self.id