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
|
||||
|
||||
Reference in New Issue
Block a user