Orient volleygun ammo attachments

This commit is contained in:
2026-01-02 20:25:56 +00:00
parent 736d0494c4
commit c02a1fd212
3 changed files with 8 additions and 1 deletions
+5
View File
@@ -129,6 +129,11 @@ inventoryX c = case c of
, tinMag
, tinMag
, tinMag
, volleyGun 4
, tinMag
, tinMag
, drumMag
, drumMag
, burstRifle
, bangCone
, tinMag
+1 -1
View File
@@ -369,7 +369,7 @@ miniGunXPictItem i it = miniGunXPict i (f $ _wTime (_itParams it))
where
f x = y * (y + z) / (100 +z)
where
z = 0
z = 0 -- increase to adjust acceleration
y = fromIntegral x
miniGunXPict :: Int -> Float -> SPic
+2
View File
@@ -34,6 +34,8 @@ orientChild itm = case _itType itm of
orientByParentChSF :: Item -> ItemSF -> Point3Q
orientByParentChSF itm lt = case (_itType itm, lt) of
(HELD FLAMETHROWER, AmmoMagSF{}) -> (V3 4 (-6) 0, Q.qID)
(HELD (VOLLEYGUN n), AmmoMagSF i _)
-> (V3 2 (2.5 + fromIntegral i * 5 - (0.5 * 5 * fromIntegral n)) 3, Q.qz (pi/2))
(HELD _, AmmoMagSF{_amsfType = ElectricalAmmo}) -> (V3 0 0 z, Q.qID)
(HELD _, AmmoMagSF{}) -> (V3 7 (itemShapeMin _y itm) 0, Q.qID)
(HELD _, WeaponScopeSF) -> (V3 5 0 5, Q.qID)