diff options
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r-- | src/subway_map.cpp | 7 |
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 }; | |||
19 | namespace { | 19 | namespace { |
20 | 20 | ||
21 | std::optional<int> GetRealSubwayDoor(const SubwayItem subway_item) { | 21 | std::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 |