diff --git a/src/Dodge/Item/Weapon.hs b/src/Dodge/Item/Weapon.hs index feb74d4aa..8b696248a 100644 --- a/src/Dodge/Item/Weapon.hs +++ b/src/Dodge/Item/Weapon.hs @@ -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 diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index 3c6986af7..8d07fa518 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -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'