Start moving bullet ammo parameters to more sensible places
This commit is contained in:
+4
-2
@@ -56,6 +56,8 @@ updateBulVel bt = case _buTrajectory bt of
|
||||
where
|
||||
t = _buTimer bt
|
||||
|
||||
-- should be made safe?
|
||||
-- should be renamed to shootBullet or something
|
||||
useAmmoParams :: Item -> Creature -> World -> World
|
||||
useAmmoParams it cr w =
|
||||
w & cWorld . lWorld . instantBullets
|
||||
@@ -63,13 +65,13 @@ useAmmoParams it cr w =
|
||||
& buPos .~ _crPos cr
|
||||
& buTrajectory %~ settrajectory
|
||||
& buVel %~ (rotateV dir . (muzvel *.*))
|
||||
& buDrag *~ _rifling (_itParams it)
|
||||
& buDrag *~ _rifling (_heldParams $ _itUse it)
|
||||
)
|
||||
where
|
||||
sp = _crPos cr +.+ (muzlength ^?! _head . _x) *.* unitVectorAtAngle dir
|
||||
dir = _crDir cr
|
||||
bultype = _laAmmoType $ _heldConsumption $ _itUse it
|
||||
muzvel = _muzVel $ _itParams it
|
||||
muzvel = _muzVel $ _heldParams $ _itUse it
|
||||
muzlength = aimingMuzzlePos cr it
|
||||
settrajectory traj = case traj of
|
||||
BasicBulletTrajectory -> BasicBulletTrajectory
|
||||
|
||||
Reference in New Issue
Block a user