Cleanup old muzzle position code
This commit is contained in:
@@ -61,6 +61,21 @@ heldItemRelativeOrient itm cr (p,q)
|
||||
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
sLen = _strideLength $ _crStance cr
|
||||
|
||||
aimingWeaponZeroPos :: Creature -> Item -> Point2
|
||||
aimingWeaponZeroPos cr it =
|
||||
aimingWeaponHandlePos cr it
|
||||
- fromMaybe 0 (it ^? itUse . heldAim . aimHandlePos)
|
||||
|
||||
-- the position of a weapon handle
|
||||
aimingWeaponHandlePos :: Creature -> Item -> Point2
|
||||
aimingWeaponHandlePos _ it = case it ^? itUse . heldAim . aimStance of
|
||||
Just TwoHandUnder -> V2 (-2) 0
|
||||
Just TwoHandOver -> V2 (-7) 0
|
||||
Just OneHand -> V2 10 (-2)
|
||||
Just TwoHandFlat -> V2 10 0
|
||||
Nothing -> 0
|
||||
|
||||
|
||||
heldItemOffset :: Item -> Creature -> Point3 -> Point3
|
||||
heldItemOffset itm cr p = fst (heldItemRelativeOrient itm cr (p,Q.qID))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user