Continue bullet refactor
This commit is contained in:
@@ -18,7 +18,6 @@ useAmmoParams :: Maybe Float -> Item -> Creature -> World -> World
|
||||
useAmmoParams vfact it cr w = w & instantBullets .:~ aBulAt
|
||||
vfact
|
||||
thetraj -- extra update
|
||||
Nothing -- color (default)
|
||||
sp
|
||||
(rotateV dir (muzvel *.* _amBulVel bultype)) -- vel
|
||||
(_rifling $ _itParams it) -- drag
|
||||
@@ -34,10 +33,10 @@ useAmmoParams vfact it cr w = w & instantBullets .:~ aBulAt
|
||||
BasicBulletTrajectory -> id
|
||||
MagnetTrajectory -> fromMaybe id $ do
|
||||
tpos <- it ^? itTargeting . tgPos . _Just
|
||||
return $ \pt -> pt & buVel .+.+~ 5 *.* normalizeV (tpos -.- head (_buTrail pt))
|
||||
return $ \pt -> pt & buVel .+.+~ 5 *.* normalizeV (tpos -.- _buPos pt)
|
||||
FlechetteTrajectory -> fromMaybe id $ do
|
||||
tpos <- it ^? itTargeting . tgPos . _Just
|
||||
return $ \pt -> pt & buVel %~ vecTurnTo 0.2 (head $ _buTrail pt) tpos
|
||||
return $ \pt -> pt & buVel %~ vecTurnTo 0.2 (_buPos pt) tpos
|
||||
BezierTrajectory -> fromMaybe id $ do
|
||||
tpos <- it ^? itTargeting . tgPos . _Just
|
||||
let bf t = bQuadToF (sp,mouseWorldPos w,tpos) $ (100 - t) * 0.05
|
||||
|
||||
Reference in New Issue
Block a user