Orient alteRifle ammo
This commit is contained in:
@@ -160,7 +160,7 @@ inventoryX c = case c of
|
|||||||
]
|
]
|
||||||
"E" -> [alteRifle
|
"E" -> [alteRifle
|
||||||
, tinMag
|
, tinMag
|
||||||
, tinMag
|
, drumMag
|
||||||
] <>
|
] <>
|
||||||
fold
|
fold
|
||||||
[ makeTypeCraftNum 1 SPRING
|
[ makeTypeCraftNum 1 SPRING
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE LambdaCase #-}
|
||||||
module Dodge.Item.Orientation (
|
module Dodge.Item.Orientation (
|
||||||
orientAttachment,
|
orientAttachment,
|
||||||
propagateOrientation,
|
propagateOrientation,
|
||||||
@@ -36,6 +37,7 @@ orientByParentChSF itm lt = case (_itType itm, lt) of
|
|||||||
(HELD FLAMETHROWER, AmmoMagSF{}) -> (V3 4 (-6) 0, Q.qID)
|
(HELD FLAMETHROWER, AmmoMagSF{}) -> (V3 4 (-6) 0, Q.qID)
|
||||||
(HELD (VOLLEYGUN n), AmmoMagSF i _)
|
(HELD (VOLLEYGUN n), AmmoMagSF i _)
|
||||||
-> (V3 2 (2.5 + fromIntegral i * 5 - (0.5 * 5 * fromIntegral n)) 3, Q.qz (pi/2))
|
-> (V3 2 (2.5 + fromIntegral i * 5 - (0.5 * 5 * fromIntegral n)) 3, Q.qz (pi/2))
|
||||||
|
(HELD ALTERIFLE, AmmoMagSF i _) -> alteRifleAmmoOrient itm i
|
||||||
(HELD _, AmmoMagSF{_amsfType = ElectricalAmmo}) -> (V3 0 0 z, Q.qID)
|
(HELD _, AmmoMagSF{_amsfType = ElectricalAmmo}) -> (V3 0 0 z, Q.qID)
|
||||||
(HELD _, AmmoMagSF{}) -> (V3 7 (itemShapeMin _y itm) 0, Q.qID)
|
(HELD _, AmmoMagSF{}) -> (V3 7 (itemShapeMin _y itm) 0, Q.qID)
|
||||||
(HELD _, WeaponScopeSF) -> (V3 5 0 5, Q.qID)
|
(HELD _, WeaponScopeSF) -> (V3 5 0 5, Q.qID)
|
||||||
@@ -46,6 +48,14 @@ orientByParentChSF itm lt = case (_itType itm, lt) of
|
|||||||
y = itemShapeMaxY itm
|
y = itemShapeMaxY itm
|
||||||
z = itemShapeMaxZ itm
|
z = itemShapeMaxZ itm
|
||||||
|
|
||||||
|
alteRifleAmmoOrient :: Item -> Int -> Point3Q
|
||||||
|
alteRifleAmmoOrient itm = \case
|
||||||
|
1 -> (V3 18 (itemShapeMin _y itm + s + 1) 0, Q.qID)
|
||||||
|
_ -> (V3 18 (itemShapeMax _y itm + s - 1) 0, Q.qz pi)
|
||||||
|
where
|
||||||
|
s | itm ^? itParams . alteRifleSwitch == Just 0 = 1
|
||||||
|
| otherwise = (-1)
|
||||||
|
|
||||||
itemShapeMaxX :: Item -> Float
|
itemShapeMaxX :: Item -> Float
|
||||||
itemShapeMaxX = itemShapeMax _1
|
itemShapeMaxX = itemShapeMax _1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user