Partial fix to jetPack
This commit is contained in:
@@ -4,8 +4,8 @@ module Dodge.Creature.YourControl
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
import Dodge.CreatureAction
|
||||
import Dodge.Creature.State
|
||||
import Dodge.Update.UsingInput
|
||||
import Dodge.CreatureState
|
||||
import Dodge.Config.KeyConfig
|
||||
|
||||
import Geometry
|
||||
@@ -23,9 +23,10 @@ yourControl :: World -> (World -> World,StdGen) -> Creature -> ((World -> World,
|
||||
yourControl w (f,g) cr = ( (updateUsingInput . f, g)
|
||||
, Just . crAutoReload . mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed strafeSpeed 0 cr
|
||||
)
|
||||
where strafeSpeed = _varMovementSpeedModifier w * equipFactor * (fromMaybe 1 $ yourItem w ^? itAimingSpeed)
|
||||
speed = _varMovementSpeedModifier w * equipFactor
|
||||
equipFactor = product $ map equipSpeed $ IM.elems $ _crInv $ _creatures w IM.! 0
|
||||
where
|
||||
strafeSpeed = _varMovementSpeedModifier w * equipFactor * (fromMaybe 1 $ yourItem w ^? itAimingSpeed)
|
||||
speed = _varMovementSpeedModifier w * equipFactor
|
||||
equipFactor = product $ map equipSpeed $ IM.elems $ _crInv $ _creatures w IM.! 0
|
||||
|
||||
wasdWithAiming :: World -> Float -> Float -> Int -> Creature -> Creature
|
||||
wasdWithAiming w speed aimSpeed i cr
|
||||
|
||||
Reference in New Issue
Block a user