This commit is contained in:
2025-10-12 20:40:40 +01:00
parent 3206cdebf6
commit 5e5b24cad0
11 changed files with 157 additions and 139 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ createGas gc = case gc of
aGasCloud :: Float -> Point2 -> Float -> Creature -> World -> World
aGasCloud pressure pos dir cr =
makeGasCloud pos $
(cr ^. crPos . _xy -.- cr ^. crOldPos . _xy) +.+ pressure *.* unitVectorAtAngle dir
(cr ^. crPos . _xy - cr ^. crOldPos . _xy) + pressure *^ unitVectorAtAngle dir
aFlame :: Float -> Point2 -> Float -> Creature -> World -> World
aFlame pressure pos dir cr = makeFlame pos vel
@@ -23,4 +23,4 @@ aFlame pressure pos dir cr = makeFlame pos vel
--w & instantParticles .:~ aFlameParticle t pos vel Nothing -- (Just $ _crID cr)
-- (t,_) = randomR (99,101) (_randGen w)
vel = (cr ^. crPos . _xy -.- cr ^. crOldPos . _xy) +.+ pressure *.* unitVectorAtAngle dir
vel = (cr ^. crPos . _xy - cr ^. crOldPos . _xy) + pressure *^ unitVectorAtAngle dir