Enable duct taping torches to rifles

This commit is contained in:
2022-07-14 11:32:32 +01:00
parent 2cfa3ca3a7
commit 79791d0df2
18 changed files with 109 additions and 154 deletions
+12
View File
@@ -0,0 +1,12 @@
module Dodge.LightSource.Torch where
import Dodge.Data
import Geometry
import LensHelp
import Dodge.Item.Draw -- heldItemOffset needs to be moved somewhere more sensible
import Dodge.LightSource -- this needs to be split!
createTorchLightOffset :: Creature -> Item -> Point3 -> World -> World
createTorchLightOffset cr it off = tempLightSources .:~ tlsTimeRadColPos 1 250 0.7
(p +.+.+ rotate3 (_crDir cr) (heldItemOffset it cr (off +.+.+ V3 8 0 1.5)))
where
p = addZ 0 $ _crPos cr