This commit is contained in:
jgk
2021-03-24 00:21:07 +01:00
parent 746f905ba1
commit 26ac0142b1
2 changed files with 18 additions and 24 deletions
-4
View File
@@ -1547,16 +1547,12 @@ explodeRemoteRocket itid ptid n w
$ set (projectiles . ix ptid . ptPict) blank
$ set (itPoint . wpFire) (flip const)
$ resetName
-- $ resetScope
$ makeExplosionAt (_ptPos (_projectiles w IM.! ptid)) w
-- $ makeShrapnelBombAt (_ptPos (_projectiles w IM.! ptid)) w
where resetName = set (itPoint . itName) "REMOTELAUNCHER"
-- resetScope = creatures . ix n . crInv . ix j . itScope . _Just . scopePos .~ (0,0)
itPoint = pointToItem $ _itemPositions w IM.! itid
throwRemoteBomb :: Int -> World -> World
throwRemoteBomb n w = setLocation $ removePict $ resetFire
-- $ resetName $ over projectiles addG $ set randGen g w
$ resetName $ over projectiles addG w
where addG = IM.insert i
$ Projectile { _ptPos = p
+18 -20
View File
@@ -26,25 +26,23 @@ update :: World -> World
update w
| _menuState w /= InGame = w
| otherwise =
let w1 = updateParticles' $ updateParticles
$ updateLightSources
$ zoneClouds
$ updateClouds
$ updateCreatures
$ updateBlocks -- $ zoning
$ updateSeenWalls
$ updateSoundQueue
$ updateCloseObjects
w
w2 = -- updateWeaponCounters $
simpleCrSprings
$ zoneCreatures $ wallEvents
$ set worldEvents id $ _worldEvents w1
w1
w3 = updateCamera
$ colCrsWalls
w2
in checkEndGame $ ppEvents w3
let w1 = updateParticles' . updateProjectiles
. updateLightSources
. zoneClouds
. updateClouds
. updateCreatures
. updateBlocks -- . zoning
. updateSeenWalls
. updateSoundQueue
$ updateCloseObjects w
in checkEndGame . ppEvents
. updateCamera
. colCrsWalls
. simpleCrSprings
. zoneCreatures
. wallEvents
. set worldEvents id
$ _worldEvents w1 w1
where -- zoning w = set wallsZone (IM.foldr wallInZone IM.empty (_walls w))
-- w
-- wallInZone wl | dist (_wlLine wl !! 0) (_wlLine wl !! 1) <= 2*zoneSize
@@ -68,7 +66,7 @@ updateSoundQueue = set soundQueue []
updateLightSources w = set tempLightSources (catMaybes tlss) w'
where (w',tlss) = mapAccumR (\a b -> _tlsUpdate b a b) w $ _tempLightSources w
updateParticles w = IM.foldr' _ptUpdate w $ _projectiles w
updateProjectiles w = IM.foldr' _ptUpdate w $ _projectiles w
updateParticles' :: World -> World
updateParticles' w = set particles' (catMaybes ps) w'