fix: walls r1 review — server (ref #52)
This commit is contained in:
+7
-3
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user