aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/rails.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/rails.cpp')
-rw-r--r--engines/mads/rails.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/mads/rails.cpp b/engines/mads/rails.cpp
index 0c946cf262..ee0ca98cd3 100644
--- a/engines/mads/rails.cpp
+++ b/engines/mads/rails.cpp
@@ -274,12 +274,18 @@ void Rails::synchronize(Common::Serializer &s) {
}
}
-void Rails::disableNode(int idx) {
- warning("TODO: Rails::disableNode");
+void Rails::disableNode(int nodeIndex) {
+ _nodes[nodeIndex]._active = false;
+
+ for (uint16 i = 0; i < _nodes.size(); i++) {
+ if (i != nodeIndex)
+ disableLine(i, nodeIndex);
+ }
}
void Rails::disableLine(int from, int to) {
- warning("TODO: Rails::disableLine");
+ _nodes[from]._distances[to] = 0x3FFF;
+ _nodes[to]._distances[from] = 0x3FFF;
}
} // End of namespace MADS