Tweak rockets, smoke

This commit is contained in:
2024-12-28 10:08:14 +00:00
parent 1507b8d3ed
commit 2abb70334f
6 changed files with 41 additions and 19 deletions
+4 -4
View File
@@ -33,8 +33,8 @@ upProjectile pu pj = case pu of
mscreenid
pj
TimePU -> decTimMvVel pj
ThrustPU st et smoke
| act st et -> doThrust pj smoke
ThrustPU st et
| act st et -> doThrust pj (pj ^? prjType . rkSmoke . _Just)
| otherwise -> id
StartSpinPU t cid spinamount
| time == t -> trySpinByCID cid spinamount pj
@@ -112,7 +112,7 @@ destroyProjectile mitid pjid w =
guard $ itm == pjid
return $ pointerToItemLocation loc . itUse . uaParams . apLinkedProjectile .~ Nothing
doThrust :: Projectile -> Bool -> World -> World
doThrust :: Projectile -> Maybe RocketSmoke -> World -> World
doThrust pj smoke w =
w
& randGen .~ g
@@ -127,7 +127,7 @@ doThrust pj smoke w =
where
lifetime = fst . randomR lt $ _randGen w
lt
| smoke = (50, 200)
| smoke == Just ReducedRocketSmoke = (50, 200)
| otherwise = (300, 500)
trailfadetime = fst . randomR (100, 300) $ _randGen w
accel = rotateV (pj ^. prjDir) (V2 3 0)