Tweak laser weapon orientation

This commit is contained in:
2025-07-10 10:52:04 +01:00
parent e3c6ef1398
commit 8a8623d30b
3 changed files with 16 additions and 14 deletions
+6 -5
View File
@@ -7,12 +7,13 @@ import Dodge.Data.DoubleTree
import Control.Lens
import Dodge.Data.AimStance
--aStance :: LocationLDT ItemLink CItem -> AimStance
--aStance loc = case loc ^. locLDT . ldtValue . _1 . itType of
--
aimStance :: LDTree ItemLink CItem -> AimStance
aimStance ldt = itemBaseStance $ ldt ^. ldtValue . _1
aimStance ldt
| islasweapon = TwoHandFlat
| otherwise = itemBaseStance $ ldt ^. ldtValue . _1
where
islasweapon = ldt ^. ldtValue . _1 . itType == CRAFT TRANSFORMER
&& ldt ^? ldtRight . ix 0 . _2 . ldtValue . _2 == Just LaserWeaponSF
itemBaseStance :: Item -> AimStance
itemBaseStance itm = case itm ^. itType of
+1
View File
@@ -33,6 +33,7 @@ orientByLink itm lt = case (_itType itm, lt) of
orientAttachment :: Item -> ItemLink -> Item -> Point3Q
orientAttachment par lnk ch = case (_itType par, lnk, _itType ch) of
(ATTACH UNDERBARRELSLOT, _, _) -> (V3 (-5) (-8) 0, Q.qID)
(_,SFLink LaserWeaponSF,_) -> (V3 2 8 0, Q.qID)
-- (HELD BURSTRIFLE, _, HELD TORCH) -> (V3 20 0 0, Q.axisAngle (V3 0 0 1) (pi/2))
-- (HELD LAUNCHER, _, HELD TORCH) -> (V3 0 20 0, Q.axisAngle (V3 0 0 1) (pi/4))
_ -> (t1 + Q.rotate q1 t2, q1 * q2)