Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -21,12 +21,12 @@ yourControl cr w
|
||||
| inTermFocus w = dimCreatureLight cr w & updateUsingInput
|
||||
| otherwise =
|
||||
dimCreatureLight cr w
|
||||
& cWorld . creatures . ix (_crID cr)
|
||||
& cWorld . lWorld . creatures . ix (_crID cr)
|
||||
%~ (wasdWithAiming w (_mvSpeed $ _crMvType cr) . mouseActionsCr (_mouseButtons w))
|
||||
& updateUsingInput
|
||||
|
||||
dimCreatureLight :: Creature -> World -> World
|
||||
dimCreatureLight cr = cWorld . tempLightSources .:~ tlsTimeRadColPos 1 300 0.1 (addZ 100 $ _crPos cr)
|
||||
dimCreatureLight cr = cWorld . lWorld . tempLightSources .:~ tlsTimeRadColPos 1 300 0.1 (addZ 100 $ _crPos cr)
|
||||
|
||||
-- note the order of operation, setting the posture first--this prevents the twist fire bug
|
||||
|
||||
@@ -57,12 +57,12 @@ wasdWithAiming w speed cr
|
||||
| otherwise = crMvAbsolute (speed *.* movAbs) . set crMvDir dir
|
||||
theTurn cr' = creatureTurnTowardDir (_crMvDir cr') 0.2 cr'
|
||||
movDir = wasdDir w
|
||||
dir = (w ^. cWorld . cwCam . cwcRot) + argV movDir
|
||||
movAbs = rotateV (w ^. cWorld . cwCam . cwcRot) $ normalizeV movDir
|
||||
dir = (w ^. cWorld . lWorld . cwCam . cwcRot) + argV movDir
|
||||
movAbs = rotateV (w ^. cWorld . lWorld . cwCam . cwcRot) $ normalizeV movDir
|
||||
isAiming = _posture (_crStance cr) == Aiming
|
||||
mouseDir = case cr ^? crInv . ix (crSel cr) . itScope . scopePos of
|
||||
Just _ -> argV $ mouseWorldPos w -.- _crPos cr
|
||||
_ -> argV (_mousePos w) + (w ^. cWorld . cwCam . cwcRot)
|
||||
_ -> argV (_mousePos w) + (w ^. cWorld . lWorld . cwCam . cwcRot)
|
||||
|
||||
wasdM :: SDL.Scancode -> Point2
|
||||
wasdM scancode = case scancode of
|
||||
|
||||
Reference in New Issue
Block a user