Correctly add all obstructed paths to doors

This commit is contained in:
2022-07-02 22:59:11 +01:00
parent 46bc135e69
commit 3efd89fa34
2 changed files with 21 additions and 8 deletions
+2 -2
View File
@@ -14,11 +14,11 @@ import Picture
import Geometry
import qualified IntMapHelp as IM
import Dodge.SoundLogic
import LensHelp
--import Dodge.LevelGen.LevelStructure
--import Data.Maybe
import Data.List
import Control.Lens
import qualified Data.IntSet as IS
import qualified Data.Graph.Inductive as FGL
import qualified Streaming.Prelude as S
@@ -53,7 +53,7 @@ addDoorWall drid wl w (wlid,wlps) = w'
, _wlID = wlid
, _wlStructure = DoorPart drid
}
& doors . ix drid . drObstructs .~ es
& doors . ix drid . drObstructs .++~ es
where
(w',es) = uncurry (obstructPathsCrossing DoorObstacle) wlps w
-- TODO use vector instead of list, perhaps also memoisation of rectanglePairs