mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Add an assert for getting proper mapElementType
This commit is contained in:
@@ -1546,9 +1546,10 @@ static uint16 map_window_get_pixel_colour_peep(int x, int y)
|
||||
colour = 10 | (colour & 0xFF00);
|
||||
|
||||
while (!map_element_is_last_for_tile(mapElement++)) {
|
||||
int mapElementType = map_element_get_type(mapElement);
|
||||
colour &= ElementTypeMaskColour[mapElementType >> 2];
|
||||
colour |= ElementTypeAddColour[mapElementType >> 2];
|
||||
int mapElementType = map_element_get_type(mapElement) >> 2;
|
||||
assert(mapElementType < countof(ElementTypeMaskColour));
|
||||
colour &= ElementTypeMaskColour[mapElementType];
|
||||
colour |= ElementTypeAddColour[mapElementType];
|
||||
}
|
||||
|
||||
return colour;
|
||||
|
||||
Reference in New Issue
Block a user