Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
+4
-5
@@ -6,7 +6,6 @@ import Dodge.Flame
|
||||
import Dodge.Item.Location
|
||||
import Dodge.Tesla.Arc
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
import Picture
|
||||
|
||||
@@ -34,15 +33,15 @@ lasBeamCombine ::
|
||||
World ->
|
||||
World
|
||||
lasBeamCombine (p, (a, b, _), (x, y, _)) =
|
||||
cWorld . lasers .:~ lasRayAt yellow 11 1 p (argV (normalizeV (b -.- a) +.+ normalizeV (y -.- x)))
|
||||
cWorld . lWorld . lasers .:~ lasRayAt yellow 11 1 p (argV (normalizeV (b -.- a) +.+ normalizeV (y -.- x)))
|
||||
|
||||
splitBeamCombine ::
|
||||
(Point2, (Point2, Point2, Beam), (Point2, Point2, Beam)) ->
|
||||
World ->
|
||||
World
|
||||
splitBeamCombine (p, (a, b, _), (x, y, _)) =
|
||||
(cWorld . lasers .:~ lasRayAt yellow 11 1 p (dir + 0.5 * pi))
|
||||
. (cWorld . lasers .:~ lasRayAt yellow 11 1 p (dir -0.5 * pi))
|
||||
(cWorld . lWorld . lasers .:~ lasRayAt yellow 11 1 p (dir + 0.5 * pi))
|
||||
. (cWorld . lWorld . lasers .:~ lasRayAt yellow 11 1 p (dir -0.5 * pi))
|
||||
where
|
||||
dir = argV (normalizeV (b -.- a) +.+ normalizeV (y -.- x))
|
||||
|
||||
@@ -51,7 +50,7 @@ teslaBeamCombine ::
|
||||
World ->
|
||||
World
|
||||
teslaBeamCombine (p, (a, b, bm), (x, y, _)) w =
|
||||
w' & pointerToItemLocation (_itemLocations (_cWorld w) IM.! itid) . itParams . subParams ?~ ip
|
||||
w' & pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix itid) . itParams . subParams ?~ ip
|
||||
where
|
||||
itid = fromJust $ _bmOrigin bm
|
||||
dir = argV (normalizeV (b -.- a) +.+ normalizeV (y -.- x))
|
||||
|
||||
Reference in New Issue
Block a user