1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Support 8 cars MOM properly while keeping our own corrupted element

This commit is contained in:
Gymnasiast
2016-02-26 15:46:14 +01:00
parent adde88ca92
commit 4f4111dedb

View File

@@ -1856,13 +1856,15 @@ static void sub_68B3FB(int x, int y)
case MAP_ELEMENT_TYPE_BANNER: case MAP_ELEMENT_TYPE_BANNER:
viewport_banner_paint_setup(direction, height, map_element); viewport_banner_paint_setup(direction, height, map_element);
break; break;
default: // A corrupt element inserted by OpenRCT2 itself, which skips the drawing of the next element only.
// This is a little hack for taking care of undefined map_elements case MAP_ELEMENT_TYPE_CORRUPT:
// 8cars MOM used a dirty version of this to skip drawing certain elements
if (map_element_is_last_for_tile(map_element)) if (map_element_is_last_for_tile(map_element))
return; return;
map_element++; map_element++;
break; break;
default:
// An undefined map element is most likely a corrupt element inserted by 8 cars' MOM feature to skip drawing of all elements after it.
return;
} }
RCT2_GLOBAL(0x9DE574, uint32_t) = dword_9DE574; RCT2_GLOBAL(0x9DE574, uint32_t) = dword_9DE574;
} while (!map_element_is_last_for_tile(map_element++)); } while (!map_element_is_last_for_tile(map_element++));