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 -4
View File
@@ -93,21 +93,21 @@ tlsTimeRadColPos t rmax col (V3 x y z) =
}
makeTlsTimeRadColPos :: Int -> Float -> Point3 -> Point3 -> World -> World
makeTlsTimeRadColPos i rad (V3 r g b) p = cWorld . tempLightSources .:~ tlsTimeRadColPos i rad (V3 r g b) p
makeTlsTimeRadColPos i rad (V3 r g b) p = cWorld . lWorld . tempLightSources .:~ tlsTimeRadColPos i rad (V3 r g b) p
destroyLS :: Int -> World -> World
destroyLS lsid w =
w
& cWorld . lightSources . at lsid .~ Nothing
& cWorld . lWorld . lightSources . at lsid .~ Nothing
& destroyLSFlashAt p3
& originsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) (xyV3 p3)
where
ls = w ^?! cWorld . lightSources . ix lsid -- unsafe
ls = w ^?! cWorld . lWorld . lightSources . ix lsid -- unsafe
p3 = _lsPos $ _lsParam ls
destroyLSFlashAt :: Point3 -> World -> World
destroyLSFlashAt (V3 x' y' z') =
cWorld . tempLightSources
cWorld . lWorld . tempLightSources
.:~ tlsTimeRadFunPos
20
150