Improve forcefield visuals

This commit is contained in:
2022-06-07 18:22:43 +01:00
parent 52488b251b
commit 956ee87168
10 changed files with 76 additions and 19 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
module Dodge.Debug.Picture where
import Dodge.Data
import Dodge.Base.Window
import Dodge.Base.Collide
import Geometry
import Picture
@@ -46,7 +47,7 @@ pointOnScreen cfig w p = pointInPolygon p . reverse $ screenPolygon cfig w
drawWallFace :: Configuration -> World -> Wall -> Picture
drawWallFace cfig w wall
| isRHS sightFrom x y || _wlOpacity wall /= Opaque = blank
| isRHS sightFrom x y || not (wlIsOpaque wall) = blank
| otherwise = setDepth (-1) . color (withAlpha 0 black) . polygon $ points
where
(x,y) = _wlLine wall