Fix laser targeting draw when creature offscreen
This commit is contained in:
@@ -150,10 +150,11 @@ invSideEff cr w = weaponReloadSounds cr
|
||||
itpointer = creatures . ix (_crID cr) . crInv . ix i
|
||||
|
||||
doHeldItemTargeting :: Creature -> World -> World
|
||||
doHeldItemTargeting cr w = case cr ^? crInv . ix (_crInvSel cr) . itTargeting . tgUpdate of
|
||||
doHeldItemTargeting cr w = case cr ^? crInv . ix (_crInvSel cr) . itTargeting of
|
||||
Nothing -> w
|
||||
Just f -> w & creatures . ix (_crID cr) . crInv . ix (_crInvSel cr) . itTargeting
|
||||
%~ f (_crInv cr IM.! _crInvSel cr) cr w
|
||||
Just NoTargeting -> w
|
||||
Just t -> let (w',t') = _tgUpdate t (_crInv cr IM.! _crInvSel cr) cr w t
|
||||
in w' & creatures . ix (_crID cr) . crInv . ix (_crInvSel cr) . itTargeting .~ t'
|
||||
|
||||
weaponReloadSounds :: Creature -> World -> World
|
||||
weaponReloadSounds cr w = case cr ^? crInv . ix (_crInvSel cr) . itConsumption of
|
||||
|
||||
Reference in New Issue
Block a user