Remove ssaTri, bullet movement is broken

This commit is contained in:
2021-12-15 17:34:20 +00:00
parent dccacd9d22
commit adab32bf68
13 changed files with 74 additions and 213 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
{-# LANGUAGE TupleSections #-}
--{-# LANGUAGE TupleSections #-}
{- Bullet update. -}
module Dodge.Particle.Bullet.Update
( mvBullet
@@ -15,15 +15,15 @@ import Control.Lens
{- Update for a generic bullet. -}
mvBullet :: World -> Particle -> (World, Maybe Particle)
mvBullet w bt'
| t <= 0 || magV (_btVel' bt) < 1 = (w,Nothing)
| t <= 0 || magV (_ptVel bt) < 1 = (w,Nothing)
| otherwise = second (fmap dodrag) $
hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
where
bt = foldr (\mg b -> _mgField mg mg b) bt' $ _magnets w
dodrag = btVel' %~ (drag *.*)
dodrag = ptVel %~ (drag *.*)
drag = _btDrag bt
mcr = _btPassThrough' bt
(p:_) = _btTrail' bt
vel = _btVel' bt
vel = _ptVel bt
hiteff = _btHitEffect' bt
t = _btTimer' bt