Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -43,10 +43,10 @@ moveTeslaArc w pt
|
||||
makesparks = makeaspark . makeaspark . makeaspark
|
||||
(lp, ld) = case last thearc of
|
||||
ArcStep lp' ld' NothingID -> (lp', ld')
|
||||
ArcStep lp' ld' (CrID crid) -> case w ^? cWorld . creatures . ix crid of
|
||||
ArcStep lp' ld' (CrID crid) -> case w ^? cWorld . lWorld . creatures . ix crid of
|
||||
Nothing -> (lp', ld')
|
||||
Just cr -> (lp' -.- (_crRad cr + 1) *.* unitVectorAtAngle ld', ld' + pi)
|
||||
ArcStep lp' ld' (WlID wlid) -> case w ^? cWorld . walls . ix wlid of
|
||||
ArcStep lp' ld' (WlID wlid) -> case w ^? cWorld . lWorld . walls . ix wlid of
|
||||
Nothing -> (lp', ld')
|
||||
Just _ -> (lp' -.- 2 *.* unitVectorAtAngle ld', ld' + pi)
|
||||
damthings (ArcStep p dir crwl) = damageCrWlID (thedamage p dir) crwl
|
||||
@@ -57,7 +57,7 @@ moveTeslaArc w pt
|
||||
shootTeslaArc' :: ItemParams -> Point2 -> Float -> World -> (World, ItemParams)
|
||||
shootTeslaArc' ip pos dir w =
|
||||
( w & randGen .~ g
|
||||
& cWorld . teslaArcs .:~ aTeslaArcAt col newarc
|
||||
& cWorld . lWorld . teslaArcs .:~ aTeslaArcAt col newarc
|
||||
, ip & currentArc ?~ newarc
|
||||
)
|
||||
where
|
||||
|
||||
@@ -31,7 +31,7 @@ defaultArcStep itparams w (ArcStep p dir _) = do
|
||||
. sortOn (dist center . _crPos)
|
||||
. filter (\cr -> dist center (_crPos cr) < csize)
|
||||
. IM.elems
|
||||
$ _creatures (_cWorld w)
|
||||
$ w ^. cWorld . lWorld . creatures --_creatures (_cWorld w)
|
||||
mwl =
|
||||
listToMaybe
|
||||
. sortOn (dist p . fst)
|
||||
|
||||
Reference in New Issue
Block a user