diff options
-rw-r--r-- | src/tracker_state.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index eee43e4..d372786 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp | |||
@@ -360,6 +360,10 @@ class StateCalculator { | |||
360 | // evaluated. | 360 | // evaluated. |
361 | for (const Door& door : GD_GetDoors()) { | 361 | for (const Door& door : GD_GetDoors()) { |
362 | int discard = IsDoorReachable(door.id); | 362 | int discard = IsDoorReachable(door.id); |
363 | |||
364 | door_report_[door.id] = {}; | ||
365 | discard = AreRequirementsSatisfied( | ||
366 | GetState().requirements.GetDoor(door.id), &door_report_[door.id]); | ||
363 | } | 367 | } |
364 | } | 368 | } |
365 | 369 | ||
@@ -522,14 +526,7 @@ class StateCalculator { | |||
522 | } | 526 | } |
523 | 527 | ||
524 | Decision IsDoorReachable_Helper(int door_id) { | 528 | Decision IsDoorReachable_Helper(int door_id) { |
525 | if (door_report_.count(door_id)) { | 529 | return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id)); |
526 | door_report_[door_id].clear(); | ||
527 | } else { | ||
528 | door_report_[door_id] = {}; | ||
529 | } | ||
530 | |||
531 | return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id), | ||
532 | &door_report_[door_id]); | ||
533 | } | 530 | } |
534 | 531 | ||
535 | Decision IsDoorReachable(int door_id) { | 532 | Decision IsDoorReachable(int door_id) { |