Add your speed to launched projectile, based on old position
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -36,7 +36,6 @@ import qualified IntMapHelp as IM
|
||||
data Creature = Creature
|
||||
{ _crPos :: Point2
|
||||
, _crOldPos :: Point2
|
||||
, _crVel :: Point2
|
||||
, _crDir :: Float
|
||||
, _crOldDir :: Float
|
||||
, _crMvDir :: Float
|
||||
|
||||
@@ -14,7 +14,6 @@ defaultCreature =
|
||||
Creature
|
||||
{ _crPos = V2 0 0
|
||||
, _crOldPos = V2 0 0
|
||||
, _crVel = V2 0 0
|
||||
, _crDir = 0
|
||||
, _crOldDir = 0
|
||||
, _crMvDir = 0
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
-- | Rexport all weapons
|
||||
module Dodge.Item.Weapon (
|
||||
module Dodge.Item.Weapon.ExtraEffect,
|
||||
module Dodge.Item.Weapon.Utility,
|
||||
module Dodge.Item.Weapon.Drone,
|
||||
) where
|
||||
|
||||
import Dodge.Item.Weapon.Drone
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.Utility
|
||||
|
||||
@@ -24,7 +24,7 @@ createShell homing payload muz cr w = w
|
||||
{ _prjPos = pos
|
||||
, _prjZ = 20
|
||||
, _prjStartPos = pos
|
||||
, _prjVel = rotateV dir (V2 1 0)
|
||||
, _prjVel = rotateV dir (V2 1 0) + cr ^. crPos - cr ^. crOldPos
|
||||
, _prjDraw = homingDrawType homing
|
||||
, _prjID = i
|
||||
, _prjAcc = rotateV dir (V2 3 0)
|
||||
|
||||
Reference in New Issue
Block a user