Cleanup launcher code
This commit is contained in:
@@ -457,15 +457,10 @@ createProjectile magtree muz itmtree cr = fromMaybe failsound $ do
|
||||
magid <- magtree ^? ldtValue . itLocation . ilInvID
|
||||
ammoitem <- cr ^? crInv . ix magid
|
||||
let homing = determineProjectileTracking magtree itmtree
|
||||
j <- ammoitem ^? itLocation . ilInvID
|
||||
aparams <- ammoitem ^? itUse . amagParams
|
||||
return $ createShell homing aparams muz itm cr
|
||||
aparams <- ammoitem ^? itUse . amagParams . ampPayload
|
||||
return $ createShell homing aparams muz cr
|
||||
. startthesound
|
||||
. useammo j
|
||||
where
|
||||
itm = itmtree ^. ldtValue
|
||||
useammo j = cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix j . itUse . amagLoadStatus . iaLoaded -~ 1
|
||||
|
||||
-- the sound should be moved to the projectile firing
|
||||
startthesound = soundMultiFrom [CrWeaponSound (_crID cr) j | j <- [0..3]] (_crPos cr) tap4S Nothing
|
||||
-- failsound = soundContinue (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing
|
||||
|
||||
Reference in New Issue
Block a user