Start making projectile update function rather than folded list

This commit is contained in:
2024-12-28 21:31:33 +00:00
parent e028c54948
commit 2fdc6ae557
9 changed files with 95 additions and 87 deletions
+8 -6
View File
@@ -32,24 +32,26 @@ createShell mdetonator mscreen pjtype payload muz cr w = w
, _pjPayload = payload
, _pjTimer = lifespan
, _pjUpdates =
[ CollisionEffectPU mdetonator mscreen
[ CollisionEffectPU
, TimePU
, StartSpinPU (lifespan - 15) (_crID cr) spinamount
, RemoteDirectionPU (lifespan - thrustdelay) 0
, ReduceSpinPU (1 - spindrag * 2 / 200)
] <> thrustorgrav
, _pjType = pjtype
, _pjDetonatorID = mdetonator
, _pjScreenID = mscreen
}
where
speed = case pjtype of
Grenade -> 4
Grenade {} -> 4
Rocket{} -> 1
lifespan = case pjtype of
Grenade -> 150
Rocket{} -> 350
RetiredProjectile -> 0
lifespan = 350
thrustorgrav = case pjtype of
Grenade -> [ApplyGravityPU]
Grenade {}-> [ApplyGravityPU]
Rocket{} -> [ThrustPU (lifespan - thrustdelay) 0]
RetiredProjectile -> []
spindrag = 1
spinamount = 2
thrustdelay = 20