Partial removal of reloading

This commit is contained in:
2024-09-08 10:21:35 +01:00
parent 581d2494dc
commit e03c8dd830
16 changed files with 256 additions and 187 deletions
+3 -2
View File
@@ -22,10 +22,11 @@ createProjectile ammoitem muz itm cr = fromMaybe failsound $ do
CreateShell -> fireShell ammoitem muz itm cr . extrafuncs j
CreateTrackingShell -> fireTrackingShell ammoitem muz itm cr . extrafuncs j
where
extrafuncs j = cancelanyreloading . startthesound . useammo j
--extrafuncs j = cancelanyreloading . startthesound . useammo j
extrafuncs j = startthesound . useammo j
useammo j = cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix j . itUse . amagLoadStatus . iaLoaded -~ 1
cancelanyreloading = cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading
--cancelanyreloading = cWorld . lWorld . creatures . ix (_crID cr) %~ crCancelReloading
-- the sound should be moved to the projectile firing
startthesound = soundMultiFrom [CrWeaponSound (_crID cr) j | j <- [0..3]] (_crPos cr) tap4S Nothing
failsound w' = case w' ^? input . mouseButtons . ix SDL.ButtonLeft of