Add in "linear" lWorld to separate time reversable worlds

This commit is contained in:
2022-10-28 12:24:51 +01:00
parent 5f6bd43599
commit 7e790b7153
130 changed files with 827 additions and 980 deletions
+4 -3
View File
@@ -7,7 +7,7 @@ import Dodge.Data.CreatureEffect
import Dodge.Data.World
import Dodge.Path
import Geometry
import qualified IntMapHelp as IM
import Control.Lens
doWdCrCr :: WdCrCr -> World -> Creature -> Creature
doWdCrCr ce = case ce of
@@ -97,7 +97,8 @@ chooseMovementSpreadGun cr w
where
d = dist cpos p
cpos = _crPos cr
tcr = _creatures (_cWorld w) IM.! 0
--tcr = _creatures (_cWorld w) IM.! 0
tcr = w ^?! cWorld . lWorld . creatures . ix 0
p = _crPos tcr
chooseMovementLtAuto :: Creature -> World -> Action
@@ -110,7 +111,7 @@ chooseMovementLtAuto cr w
DoImpulses [UseItem, TurnToward p' 0.05, Move (V2 0 3)]
where
cpos = _crPos cr
tcr = _creatures (_cWorld w) IM.! 0
tcr = w ^?! cWorld . lWorld . creatures . ix 0
p = _crPos tcr
v = vNormal $ p -.- cpos
p' = p +.+ 0.5 *.* (v -.- 20 *.* normalizeV v)