Continue streaming refactor

This commit is contained in:
2022-06-26 01:34:58 +01:00
parent e2d09d57e9
commit ac9181e1a1
4 changed files with 29 additions and 20 deletions
+3 -4
View File
@@ -33,7 +33,6 @@ import qualified Data.Map.Strict as M
import qualified SDL
import Data.Maybe
import Control.Lens
import Control.Applicative
launcher :: Item
launcher = defaultWeapon
@@ -333,10 +332,10 @@ moveRemoteShell cid itid pj w
doExplosion = explodeRemoteRocket itid i $ stopSoundFrom (ShellSound i) w
anythingHitCirc :: Float -> Point2 -> Point2 -> World -> Bool
anythingHitCirc rad sp ep w = isJust $ hitCr <|> hitWl
anythingHitCirc rad sp ep w = isJust hitCr || isJust (sequence hitWl)
where
hitCr = fst <$> collideCircCrsPoint sp ep rad (_creatures w)
hitWl = fst <$> collideCircWallsList sp ep rad (wallsNearPoint' ep w)
hitCr = collideCircCrsPoint sp ep rad (_creatures w)
hitWl = collideCircWallsStream sp ep rad $ wallsNearPoint ep w
-- this should probably be wallsOnLine or something
explodeRemoteRocket