diff options
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r-- | src/game_data.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game_data.cpp b/src/game_data.cpp index 351f515..9d4dae0 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
@@ -43,6 +43,8 @@ struct GameData { | |||
43 | std::map<std::string, int> panel_by_id_; | 43 | std::map<std::string, int> panel_by_id_; |
44 | std::map<std::string, int> area_by_id_; | 44 | std::map<std::string, int> area_by_id_; |
45 | 45 | ||
46 | std::vector<int> door_definition_order_; | ||
47 | |||
46 | std::map<std::string, int> room_by_painting_; | 48 | std::map<std::string, int> room_by_painting_; |
47 | 49 | ||
48 | std::vector<int> achievement_panels_; | 50 | std::vector<int> achievement_panels_; |
@@ -194,6 +196,7 @@ struct GameData { | |||
194 | for (const auto &door_it : room_it.second["doors"]) { | 196 | for (const auto &door_it : room_it.second["doors"]) { |
195 | int door_id = | 197 | int door_id = |
196 | AddOrGetDoor(room_obj.name, door_it.first.as<std::string>()); | 198 | AddOrGetDoor(room_obj.name, door_it.first.as<std::string>()); |
199 | door_definition_order_.push_back(door_id); | ||
197 | Door &door_obj = doors_[door_id]; | 200 | Door &door_obj = doors_[door_id]; |
198 | 201 | ||
199 | bool has_external_panels = false; | 202 | bool has_external_panels = false; |
@@ -347,7 +350,9 @@ struct GameData { | |||
347 | } | 350 | } |
348 | } | 351 | } |
349 | 352 | ||
350 | for (const Door &door : doors_) { | 353 | for (int door_id : door_definition_order_) { |
354 | const Door &door = doors_.at(door_id); | ||
355 | |||
351 | if (!door.skip_location) { | 356 | if (!door.skip_location) { |
352 | int room_id = door.room; | 357 | int room_id = door.room; |
353 | std::string area_name = rooms_[room_id].name; | 358 | std::string area_name = rooms_[room_id].name; |