Fix bug in attached item position orienting

This commit is contained in:
2024-10-02 22:57:10 +01:00
parent 6bcd5bc591
commit 49ffbfafc2
8 changed files with 105 additions and 97 deletions
-16
View File
@@ -1,16 +0,0 @@
module Dodge.LightSource.Torch
( createTorchLightOffset
) where
import Dodge.Data.World
import Dodge.Item.Draw -- heldItemOffset needs to be moved somewhere more sensible
import Dodge.LightSource -- this needs to be split!
import Geometry
import LensHelp
createTorchLightOffset :: Creature -> Item -> Point3 -> World -> World
createTorchLightOffset cr it off = cWorld . lWorld . tempLightSources .:~
tlsTimeRadColPos 1 250 0.7 pos
where
pos = (p +.+.+ rotate3 (_crDir cr) (heldItemOffset it cr (off +.+.+ V3 8 0 1.5)))
p = addZ 0 $ _crPos cr