From 52bc9fdf99d452c592e174acd9cb174ec00e19d7 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 16 Jul 2024 00:47:11 -0400 Subject: Added path tracking for debugging --- src/game_data.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game_data.cpp') diff --git a/src/game_data.cpp b/src/game_data.cpp index e75170e..4c0104f 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -109,6 +109,7 @@ struct GameData { auto process_single_entrance = [this, room_id, from_room_id](const YAML::Node &option) { Exit exit_obj; + exit_obj.source_room = from_room_id; exit_obj.destination_room = room_id; if (option["door"]) { @@ -143,7 +144,7 @@ struct GameData { switch (entrance_it.second.Type()) { case YAML::NodeType::Scalar: { // This is just "true". - rooms_[from_room_id].exits.push_back({.destination_room = room_id}); + rooms_[from_room_id].exits.push_back({.source_room = from_room_id, .destination_room = room_id}); break; } case YAML::NodeType::Map: { -- cgit 1.4.1