Fix no damage to walls bug
This commit is contained in:
@@ -2,6 +2,7 @@ module Dodge.Render.ShapePicture (
|
||||
worldSPic,
|
||||
) where
|
||||
|
||||
import Dodge.Zoning.Base
|
||||
import Control.Lens
|
||||
import Data.Foldable
|
||||
import qualified Data.Graph.Inductive as FGL
|
||||
@@ -49,7 +50,7 @@ import Dodge.Zone
|
||||
import Dodge.Zoning
|
||||
import Geometry
|
||||
import Geometry.ConvexPoly
|
||||
import Geometry.Zone
|
||||
--import Geometry.Zone
|
||||
import qualified IntMapHelp as IM
|
||||
import Padding
|
||||
import Picture
|
||||
@@ -285,18 +286,20 @@ drawFarWallDetect w =
|
||||
|
||||
drawDDATest :: World -> Picture
|
||||
drawDDATest w =
|
||||
runIdentity (S.foldMap_ (drawZoneCol orange 50) ps)
|
||||
<> runIdentity (S.foldMap_ (drawZoneCol green 50) ps')
|
||||
<> runIdentity (S.foldMap_ drawCross qs)
|
||||
<> color blue (runIdentity (S.foldMap_ drawCross qs'))
|
||||
foldMap (drawZoneCol orange 50) ps
|
||||
-- runIdentity (S.foldMap_ (drawZoneCol orange 50) ps)
|
||||
-- <> runIdentity (S.foldMap_ (drawZoneCol green 50) ps')
|
||||
-- <> runIdentity (S.foldMap_ drawCross qs)
|
||||
-- <> color blue (runIdentity (S.foldMap_ drawCross qs'))
|
||||
<> setLayer DebugLayer (color yellow (line [cvf, mwp]))
|
||||
where
|
||||
cvf = _cameraViewFrom (_cWorld w)
|
||||
mwp = mouseWorldPos w
|
||||
ps = ddaStreamX 50 cvf mwp
|
||||
ps' = ddaStreamY 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
qs = xIntercepts 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
qs' = yIntercepts 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
--ps = ddaStreamX 50 cvf mwp
|
||||
ps = zoneOfSeg' 50 cvf mwp
|
||||
--ps' = ddaStreamY 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
--qs = xIntercepts 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
--qs' = yIntercepts 50 (_cameraViewFrom (_cWorld w)) (mouseWorldPos w)
|
||||
|
||||
drawCross :: Point2 -> Picture
|
||||
drawCross p = setLayer DebugLayer . color red . uncurryV translate p $ crossPic 5
|
||||
|
||||
Reference in New Issue
Block a user