Tweak weapon pictures

This commit is contained in:
2021-10-03 13:19:53 +01:00
parent 8c1496e140
commit 0c6fa80ce0
18 changed files with 358 additions and 287 deletions
+6 -2
View File
@@ -39,8 +39,10 @@ pictureWeaponOnAimItem p cr posInInv
= shoulderD twistWep
| isSelected && _posture (_crStance cr) == Aiming && isOneHand
= shoulderD oneHandWep
| isSelected && _posture (_crStance cr) == Aiming
| isSelected && _posture (_crStance cr) == Aiming && isTwoHandFlat
= shoulderD drawnWep
| isSelected && isTwoHandFlat
= handD holsteredTwoFlat
| isSelected && isOneHand
= handD holsteredOneHandWep
| isSelected
@@ -50,10 +52,11 @@ pictureWeaponOnAimItem p cr posInInv
shoulderD = translateSPz 18
handD = translateSPz 15
isSelected = _crInvSel cr == posInInv
drawnWep = translateSPf (_crRad cr) 0 p
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)
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
@@ -61,6 +64,7 @@ pictureWeaponOnAimItem p cr posInInv
theIt = _crInv cr IM.! posInInv
isTwisting = _itAimStance theIt == TwoHandTwist
isOneHand = _itAimStance theIt == OneHand
isTwoHandFlat = _itAimStance theIt == TwoHandFlat
sRot = case cr ^? crStance . carriage of
Just (Walking x LeftForward) -> f x
Just (Walking x RightForward) -> - f x