mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add an assert for getting proper mapElementType
This commit is contained in:
parent
de52321026
commit
79e5bb758d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue