Move handle positions
This commit is contained in:
@@ -11,8 +11,9 @@ import ShapePicture
|
||||
-- the position of a weapon handle
|
||||
aimingWeaponHandlePos :: Creature -> Item -> Point2
|
||||
aimingWeaponHandlePos _ it = case it ^? itUse . heldAim . aimStance of
|
||||
Just TwoHandTwist -> 0
|
||||
Just OneHand -> V2 10 0
|
||||
Just TwoHandUnder -> 0
|
||||
Just TwoHandOver -> V2 (-7) 0
|
||||
Just OneHand -> V2 10 (-2)
|
||||
Just TwoHandFlat -> V2 10 0
|
||||
Nothing -> 0
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ twoFlat :: Creature -> Bool
|
||||
twoFlat = crInAimStance TwoHandFlat
|
||||
|
||||
twists :: Creature -> Bool
|
||||
twists = crInAimStance TwoHandTwist
|
||||
twists cr = crInAimStance TwoHandUnder cr || crInAimStance TwoHandOver cr
|
||||
|
||||
-- the use of crOldPos is because the damage position is calculated on the
|
||||
-- previous frame
|
||||
@@ -124,7 +124,8 @@ hasFrontArmour p cr = fromMaybe False $ do
|
||||
|
||||
frontarmdirection
|
||||
| crInAimStance OneHand cr = 0.5
|
||||
| crInAimStance TwoHandTwist cr = negate 1
|
||||
| crInAimStance TwoHandUnder cr = negate 1
|
||||
| crInAimStance TwoHandOver cr = negate 1
|
||||
| otherwise = 0
|
||||
|
||||
--crOnSeg :: Point2 -> Point2 -> Creature -> Bool
|
||||
|
||||
@@ -117,7 +117,11 @@ wasdWithAiming w speed cr
|
||||
astance <- cr ^? crInv . ix itRef . itUse . heldAim . aimStance
|
||||
let currenttwistamount = cr ^. crTwist
|
||||
case (astance, currenttwistamount) of
|
||||
(TwoHandTwist, 0) ->
|
||||
(TwoHandUnder, 0) ->
|
||||
return $
|
||||
(crTwist .~ twistamount * pi)
|
||||
. (crDir -~ twistamount * pi)
|
||||
(TwoHandOver, 0) ->
|
||||
return $
|
||||
(crTwist .~ twistamount * pi)
|
||||
. (crDir -~ twistamount * pi)
|
||||
|
||||
Reference in New Issue
Block a user