From fd401db97fb25930594c90488faab56e6e84947d Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 2 Dec 2025 22:25:14 +0000 Subject: [PATCH] Simplify dust update --- src/Dodge/Update.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 886066524..2bdd9e6b5 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -852,14 +852,14 @@ updateDust w c where v@(V3 _ _ vz) = c ^. dsVel + sum (map (radiusSpring 10 oldPos . _dsPos) (dssNearPoint oldPos2 w)) - -- foldl' (dustSpringVel c) (_dsVel c) (dssNearPoint oldPos2 w) newvel = 0.95 * (maybe v (addZ vz . snd) hitWl - V3 0 0 0.05) oldPos = _dsPos c oldPos2 = stripZ oldPos newPos@(V3 _ _ npz) = oldPos + v newPos2 = stripZ newPos hitWl = bouncePoint (const True) 1 oldPos2 newPos2 w - finalpos = addZ (max 1 npz) $ maybe newPos2 fst hitWl + --finalpos = addZ (max 1 npz) $ maybe newPos2 fst hitWl + finalpos = oldPos + newvel & _z %~ max 1 radiusSpring :: Float -> Point3 -> Point3 -> Point3 radiusSpring r a b