about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/subway_map.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 044e6fa..9bfedf9 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -19,7 +19,6 @@ enum class ItemDrawType { kNone, kBox, kOwl };
19namespace { 19namespace {
20 20
21std::optional<int> GetRealSubwayDoor(const SubwayItem subway_item) { 21std::optional<int> GetRealSubwayDoor(const SubwayItem subway_item) {
22 std::optional<int> subway_door = subway_item.door;
23 if (AP_IsSunwarpShuffle() && subway_item.sunwarp && 22 if (AP_IsSunwarpShuffle() && subway_item.sunwarp &&
24 subway_item.sunwarp->type != SubwaySunwarpType::kFinal) { 23 subway_item.sunwarp->type != SubwaySunwarpType::kFinal) {
25 int sunwarp_index = subway_item.sunwarp->dots - 1; 24 int sunwarp_index = subway_item.sunwarp->dots - 1;
@@ -29,12 +28,12 @@ std::optional<int> GetRealSubwayDoor(const SubwayItem subway_item) {
29 28
30 for (const auto &[start_index, mapping] : AP_GetSunwarpMapping()) { 29 for (const auto &[start_index, mapping] : AP_GetSunwarpMapping()) {
31 if (start_index == sunwarp_index || mapping.exit_index == sunwarp_index) { 30 if (start_index == sunwarp_index || mapping.exit_index == sunwarp_index) {
32 subway_door = GD_GetSunwarpDoors().at(mapping.dots - 1); 31 return GD_GetSunwarpDoors().at(mapping.dots - 1);
33 } 32 }
34 } 33 }
35
36 return subway_door;
37 } 34 }
35
36 return subway_item.door;
38} 37}
39 38
40} // namespace 39} // namespace