Add tank furniture, stop autorotate when aiming
This commit is contained in:
@@ -430,12 +430,10 @@ miniGun = defaultAutoGun
|
||||
miniGunPictItem :: Item -> SPic
|
||||
miniGunPictItem it = miniGunPict spin (loadedAmmo it)
|
||||
where
|
||||
spin = 10 * _wpLoadedAmmo it + _wpCurWarmUp it
|
||||
|
||||
spin = (-10) * _wpLoadedAmmo it + _wpCurWarmUp it
|
||||
|
||||
miniGunPict :: Int -> Int -> SPic
|
||||
miniGunPict spin am =
|
||||
--( ( rotateSHx a .translateSH (V3 5 0 (-9)) . colorSH red $ upperPrismPoly 18 $ rectNESW 9 7 (-9) (-5))
|
||||
( colorSH red (rotateSHx a barrels)
|
||||
<> colorSH red (upperPrismPoly 5 $ rectNESW 8 8 (-8) 4)
|
||||
<> colorSH red (prismPoly
|
||||
@@ -452,7 +450,7 @@ miniGunPict spin am =
|
||||
(map (addZ 0) $ rectNESW 4 12 (-4) (-5))
|
||||
barrels = concatMap (\an -> aBarrel & rotateSHx an) [0,0.5* pi, pi, 1.5*pi]
|
||||
a = fromIntegral spin / 100
|
||||
x = fromIntegral am / 20
|
||||
x = fromIntegral am / 10
|
||||
clip y z = translateSH (V3 0 (-1) z) (rotateSHx (negate $ pi/4)
|
||||
. upperPrismPoly 2
|
||||
$ rectNESW (negate $ 3 + 0.25 * x) y 3 (y-5))
|
||||
|
||||
Reference in New Issue
Block a user