Add your speed to launched projectile, based on old position

This commit is contained in:
2024-12-20 17:49:46 +00:00
parent 056b8be534
commit 1e23c9bd1e
5 changed files with 2 additions and 6 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -36,7 +36,6 @@ import qualified IntMapHelp as IM
data Creature = Creature
{ _crPos :: Point2
, _crOldPos :: Point2
, _crVel :: Point2
, _crDir :: Float
, _crOldDir :: Float
, _crMvDir :: Float
-1
View File
@@ -14,7 +14,6 @@ defaultCreature =
Creature
{ _crPos = V2 0 0
, _crOldPos = V2 0 0
, _crVel = V2 0 0
, _crDir = 0
, _crOldDir = 0
, _crMvDir = 0
-2
View File
@@ -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
+1 -1
View File
@@ -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)