Make chasms remove RoomPos within their boundaries

This commit is contained in:
2025-10-07 10:43:15 +01:00
parent 4cc5477f07
commit e9178f9643
12 changed files with 280 additions and 256 deletions
+4 -4
View File
@@ -168,21 +168,21 @@ gameRoomFromRoom rm =
[ p +.+ 10 *.* unitVectorAtAngle a
, p -.- 10 *.* unitVectorAtAngle a
]
filterUnusedLinks rp = case _rpLinkStatus rp of
filterUnusedLinks rp = case _rpType rp of
UnusedLink{} -> Just $ _rpPos rp
_ -> Nothing
filterUsedLinks rp = case _rpLinkStatus rp of
filterUsedLinks rp = case _rpType rp of
UsedOutLink{} -> doubleShift (_rpPos rp) (_rpDir rp)
UsedInLink{} -> doubleShift (_rpPos rp) (_rpDir rp)
_ -> []
undir rp = case _rpLinkStatus rp of
undir rp = case _rpType rp of
UsedOutLink{} -> ma
UsedInLink{} -> ma
_ -> Nothing
where
ma = Just $ 0.5 * pi + _rpDir rp + snd (_rmShift rm)
closePoints x y = roundPoint2 x == roundPoint2 y
getDir (rp : xs) = case _rpLinkStatus rp of
getDir (rp : xs) = case _rpType rp of
UsedInLink{} -> _rpDir rp + snd (_rmShift rm)
_ -> getDir xs
getDir _ = 0 -- fallback