Implement wall penetrating bullets

This commit is contained in:
jgk
2021-03-23 12:06:46 +01:00
parent 63a50f0e05
commit 941fef134d
7 changed files with 67 additions and 90 deletions
+8 -7
View File
@@ -88,13 +88,14 @@ mvGenBullet' w bt
$ set ptPict' (bulLine col wth (p:p:ps))
$ set btTimer' (t-1) bt
)
| otherwise = case thingsHitExceptCr mcr p (p +.+ vel) w of
[] -> (w, Just $ set btPassThrough' Nothing
$ set btTrail' (p +.+ vel :p:ps)
$ set ptPict' (bulLine col wth (p +.+ vel:p:ps))
$ set btTimer' (t-1) bt
)
hits -> hiteff bt hits w
| otherwise = hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
-- case thingsHitExceptCr mcr p (p +.+ vel) w of
-- [] -> (w, Just $ set btPassThrough' Nothing
-- $ set btTrail' (p +.+ vel :p:ps)
-- $ set ptPict' (bulLine col wth (p +.+ vel:p:ps))
-- $ set btTimer' (t-1) bt
-- )
-- hits -> hiteff bt hits w
where mcr = _btPassThrough' bt
col = _btColor' bt
(p:ps) = _btTrail' bt