fix: walls r1 review — server (ref #52)

This commit is contained in:
2026-11-20 08:42:50 +01:00
parent f9f26a4a01
commit e1a5b297e4
11 changed files with 198 additions and 167 deletions
+7 -3
View File
@@ -30,10 +30,14 @@ proc geometryWalls*(sc: SceneRec, forSight = false): seq[Wall] =
of sdBoth: wdBoth
of sdLeft: wdLeft
of sdRight: wdRight
var wall = Wall(a: w.a, b: w.b, door: w.door, open: w.open, sightDir: dir,
var open = w.open
when defined(leakfault):
# Negative control for the door-equivalence group (#56): a secret door behaves like an open
# one, in a `-d:leakfault` build only. The shipped build has no fault path at all.
if forSight and w.secret and faultActive("secretgap"):
open = true
let wall = Wall(a: w.a, b: w.b, door: w.door, open: open, sightDir: dir,
sightBarrier: w.blocksSight, movementBarrier: w.blocksMovement)
if forSight and w.secret and faultActive("secretgap"):
wall.open = true
result.add wall
proc ruleWall*(w: WallRec): Wall =