Test making walking movement slightly more floaty
This commit is contained in:
@@ -23,16 +23,12 @@ import NewInt
|
||||
import qualified SDL
|
||||
|
||||
-- | The AI equivalent for your control.
|
||||
yourControl :: Creature -> World -> World
|
||||
yourControl _ w
|
||||
yourControl :: World -> World
|
||||
yourControl w
|
||||
| inTextInputFocus w = w
|
||||
| NoSubInventory <- w ^. hud . subInventory =
|
||||
w
|
||||
& cWorld
|
||||
. lWorld
|
||||
. creatures
|
||||
. ix 0
|
||||
%~ wasdWithAiming w
|
||||
& cWorld . lWorld . creatures . ix 0 %~ wasdWithAiming w
|
||||
& tryClickUse (w ^. input . mouseButtons)
|
||||
& handleHotkeys
|
||||
| otherwise = w & cWorld . lWorld . creatures . ix 0 %~ wasdWithAiming w
|
||||
@@ -147,7 +143,7 @@ wasdMovement lw inp cam speed = theMovement . setMvAim
|
||||
movAbs = rotateV (cam ^. camRot) $ normalizeV movDir
|
||||
theMovement
|
||||
| movDir == V2 0 0 = id
|
||||
| otherwise = crMvAbsolute lw (speed *.* movAbs)
|
||||
| otherwise = crMvAbsolute lw (speed *^ movAbs)
|
||||
|
||||
aimTurn :: LWorld -> Float -> Creature -> Creature
|
||||
aimTurn lw a cr = creatureTurnTowardDir a (x * 0.2) cr
|
||||
|
||||
Reference in New Issue
Block a user