Fix aiming with no weapon crash

This commit is contained in:
2022-02-08 12:47:58 +00:00
parent 9ead5b3979
commit 0a860e6f68
39 changed files with 317 additions and 244 deletions
+5 -6
View File
@@ -8,10 +8,9 @@ import Dodge.Data
import Dodge.WorldEvent.ThingsHit
--import Picture
import Geometry
--import Geometry.Vector3D
import LensHelp
import Data.Bifunctor
import Control.Lens
{- Update for a generic bullet. -}
mvBullet :: World -> Particle -> (World, Maybe Particle)
mvBullet w bt'
@@ -20,10 +19,10 @@ mvBullet w bt'
hiteff bt (thingsHitExceptCr mcr p (p +.+ vel) w) w
where
bt = foldr (\mg b -> _mgField mg mg b) bt' $ _magnets w
dodrag = ptVel %~ (drag *.*)
dodrag = ptVel .*.*~ drag
drag = _btDrag bt
mcr = _btPassThrough' bt
mcr = _ptCrIgnore bt
(p:_) = _ptTrail bt
vel = _ptVel bt
hiteff = _btHitEffect' bt
t = _btTimer' bt
hiteff = _ptHitEff bt
t = _ptTimer bt