Fix laser targeting draw when creature offscreen

This commit is contained in:
2022-03-06 22:58:05 +00:00
parent f82bd3f788
commit 1364e7c8c8
14 changed files with 108 additions and 138 deletions
+2 -1
View File
@@ -71,6 +71,7 @@ data World = World
, _cameraRot :: Float
, _cameraZoom :: Float
, _cameraViewFrom :: Point2
, _viewDistance :: Float
, _creatures :: IM.IntMap Creature
, _creaturesZone :: Zone (IM.IntMap Creature)
, _creatureGroups :: IM.IntMap CrGroupParams
@@ -381,7 +382,7 @@ data Targeting
= NoTargeting
| TargetingOnHeld
{ _tgPos :: Maybe Point2
, _tgUpdate :: Item -> Creature -> World -> Targeting -> Targeting
, _tgUpdate :: Item -> Creature -> World -> Targeting -> (World, Targeting)
, _tgDraw :: Int -> Item -> Creature -> World -> Picture
, _tgID :: Maybe Int
, _tgActive :: Bool