This commit is contained in:
2026-04-04 20:55:39 +01:00
parent def204d211
commit b3b1fc6d87
2 changed files with 3 additions and 9 deletions
+3 -3
View File
@@ -30,9 +30,9 @@ updateCarriage' cid cr w = \case
_ -> w & tocr . crPos . _xy +~ 0.5 *^ (cr ^. crOldPos - oop) ^. _xy
Floating -> w
Flying {_zSpeed = dz, _flyInertia = x} ->
w & cWorld . lWorld . creatures . ix cid . crPos . _xy +~ x *^ f (cr ^. crOldPos . _xy - oop ^. _xy)
& cWorld . lWorld . creatures . ix cid . crPos . _z +~ dz
& cWorld . lWorld . creatures . ix cid . crStance . carriage . zSpeed
w & tocr . crPos . _xy +~ x *^ f (cr ^. crOldPos . _xy - oop ^. _xy)
& tocr . crPos . _z +~ dz
& tocr . crStance . carriage . zSpeed
%~ if cr ^. crPos . _z < 17 then min 0.05 . (+0.001) else max (-0.05) . subtract 0.001
Boosting {} -> w
Falling {} ->
-6
View File
@@ -35,12 +35,6 @@ import RandomHelp
import qualified SDL
import ShortShow
tocrs ::
( IM.IntMap Creature ->
Const (Endo [String]) (IM.IntMap Creature)
) ->
Universe ->
Const (Endo [String]) Universe
tocrs = uvWorld . cWorld . lWorld . creatures
testStringInit :: Universe -> [String]