Narrow down non-termination to thingsHit[LongLine]

This commit is contained in:
2021-03-15 19:36:33 +01:00
parent 370f41738c
commit f939535657
3 changed files with 24 additions and 99 deletions
+12 -1
View File
@@ -337,7 +337,7 @@ launcher = defaultGun
}
bezierGun = defaultGun
{ _itName = "B-GUN"
, _wpFire = bezierTarget
, _wpFire = bezierControl'
}
remoteLauncher = defaultGun
@@ -1407,6 +1407,8 @@ grenadePic x = pictures [ color (dark $ dark green) $ circleSolid 5
$ scale 0.05 0.05 $ color green $ text $ show $ 1 + quot x 20
]
bezTest cid w = mkBezierBul (0,11) (0,20) (0,20) cid w
bezierTarget :: Int -> World -> World
bezierTarget cid w = setTarget w
where
@@ -1424,6 +1426,15 @@ bezierControl targetp cid w = resetGun $ shootWithSound 0 (mkBezierBul startp co
startp = _crPos cr +.+ rotateV dir (_crRad cr + 1,0)
resetGun = set (creatures . ix cid . crInv . ix j . wpFire) $ bezierTarget
bezierControl' :: Int -> World -> World
bezierControl' cid w = shootWithSound 0 (mkBezierBul startp controlp controlp) cid w
where
j = _crInvSel $ _creatures w IM.! cid
controlp = _crPos cr +.+ (20,20)
cr = _creatures w IM.! cid
dir = _crDir cr
startp = _crPos cr +.+ (11,11)
mkBezierBul :: Point2 -> Point2 -> Point2 -> Int -> World -> World
mkBezierBul startp controlp targetp cid w = over particles' (bbul :) w
where