Move towards recording aim position in LWorld
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -147,6 +147,7 @@ data LWorld = LWorld
|
||||
, _lTestInt :: Int
|
||||
, _hotkeys :: M.Map Hotkey (NewInt ItmInt)
|
||||
, _imHotkeys :: NewIntMap ItmInt Hotkey
|
||||
, _lAimPos :: Point2
|
||||
}
|
||||
|
||||
--data WorldBeams = WorldBeams
|
||||
|
||||
@@ -105,7 +105,6 @@ defaultLWorld =
|
||||
, _itemLocations = IM.empty
|
||||
, _props = IM.empty
|
||||
, _projectiles = IM.empty
|
||||
-- , _instantBullets = []
|
||||
, _bullets = []
|
||||
, _flames = []
|
||||
, _radarSweeps = []
|
||||
@@ -114,13 +113,10 @@ defaultLWorld =
|
||||
, _energyBalls = []
|
||||
, _radarBlips = []
|
||||
, _flares = []
|
||||
, -- , _newBeams = WorldBeams [] [] [] []
|
||||
-- , _beams = WorldBeams [] [] [] []
|
||||
_teslaArcs = []
|
||||
, _teslaArcs = []
|
||||
, _arcNode = mempty
|
||||
, _shockwaves = []
|
||||
, _lasers = []
|
||||
-- , _lasersToDraw = []
|
||||
, _tractorBeams = mempty
|
||||
, _linearShockwaves = mempty
|
||||
, _walls = IM.empty
|
||||
@@ -138,7 +134,6 @@ defaultLWorld =
|
||||
, _buttons = IM.empty
|
||||
, _corpses = IM.empty
|
||||
, _lightSources = IM.empty
|
||||
-- , _tempLightSources = []
|
||||
, _lights = mempty
|
||||
, _seenLocations =
|
||||
IM.fromList
|
||||
@@ -153,6 +148,7 @@ defaultLWorld =
|
||||
, _lTestInt = 0
|
||||
, _hotkeys = mempty
|
||||
, _imHotkeys = mempty
|
||||
, _lAimPos = 0
|
||||
}
|
||||
|
||||
defaultHUD :: HUD
|
||||
|
||||
@@ -298,8 +298,13 @@ functionalUpdate u =
|
||||
-- . over uvWorld updateInventorySelectionList
|
||||
. set (uvWorld . cWorld . lWorld . flares) []
|
||||
. set (uvWorld . cWorld . lWorld . lights) []
|
||||
. updateAimPos
|
||||
$ over uvWorld updatePastWorlds u
|
||||
|
||||
updateAimPos :: Universe -> Universe
|
||||
updateAimPos u = u & uvWorld . cWorld . lWorld . lAimPos
|
||||
.~ mouseWorldPos (u ^. uvWorld . input) (u ^. uvWorld . wCam)
|
||||
|
||||
updateMagnets :: LWorld -> LWorld
|
||||
updateMagnets lw =
|
||||
lw & oldMagnets .~ (lw ^. magnets)
|
||||
|
||||
Reference in New Issue
Block a user