Add forgotten files, many updates concerning turrets and shields

This commit is contained in:
2021-11-05 19:58:55 +00:00
parent 2c768845b2
commit 5a52b646e1
21 changed files with 380 additions and 34 deletions
+11 -3
View File
@@ -55,8 +55,8 @@ pictureWeaponOnAimItem p cr posInInv
drawnWep = translateSPf (1.2 * _crRad cr) 0 p
twistWep = translateSPf (0.5 * _crRad cr) 0 p
oneHandWep = translateSPf (1.5 * _crRad cr) 0 p
holsteredWep = translateSPf (_crRad cr) 0 (rotateSP (sRot + 1.2) p)
holsteredTwoFlat = translateSPf (_crRad cr) 0 (rotateSP (2*sRot) p)
holsteredWep = translateSPf (_crRad cr) 0 (rotateSP (strideRot cr + 1.2) p)
holsteredTwoFlat = translateSPf (_crRad cr) 0 (rotateSP (twoFlatHRot cr) p)
holsteredOneHandWep = translateSPf (_crRad cr * 0.7 + handPos) (_crRad cr * negate 0.7) p
handPos = case cr^? crStance . carriage of
Just (Walking x LeftForward) -> f x * 50
@@ -65,13 +65,21 @@ pictureWeaponOnAimItem p cr posInInv
isTwisting = _itAimStance theIt == TwoHandTwist
isOneHand = _itAimStance theIt == OneHand
isTwoHandFlat = _itAimStance theIt == TwoHandFlat
sRot = case cr ^? crStance . carriage of
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
sLen = _strideLength $ _crStance cr
strideRot :: Creature -> Float
strideRot cr = case cr ^? crStance . carriage of
Just (Walking x LeftForward) -> f x
Just (Walking x RightForward) -> - f x
_ -> 0
where
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
sLen = _strideLength $ _crStance cr
twoFlatHRot :: Creature -> Float
twoFlatHRot cr = 2*strideRot cr
pictureItem
:: SPic
-> Creature