mirror of https://github.com/OpenRCT2/OpenRCT2.git
Scenery now works correctly in scenario editor
There were a couple bugs that were causing functions to return unsuccessful if you were in scenario editor.
This commit is contained in:
parent
d9cd873ad7
commit
6b8709aed0
|
@ -754,6 +754,8 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(*ebx & GAME_COMMAND_FLAG_APPLY){
|
||||
rct_map_element* map_element = map_get_first_element_at(x3 / 32, y3 / 32);
|
||||
while(map_element_get_type(map_element) != MAP_ELEMENT_TYPE_SCENERY_MULTIPLE ||
|
||||
|
@ -765,7 +767,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
map_invalidate_tile_full(x3, y3);
|
||||
map_element_remove(map_element);
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -842,6 +844,8 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32);
|
||||
while(map_element->type != map_element_type ||
|
||||
map_element->base_height != base_height ||
|
||||
|
@ -863,7 +867,7 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int
|
|||
map_element->properties.scenery.colour_2 |= color2;
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
*ebx = 0;
|
||||
}
|
||||
|
||||
|
@ -1017,6 +1021,8 @@ void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* ed
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(*ebx & GAME_COMMAND_FLAG_APPLY){
|
||||
rct_map_element* map_element = map_get_first_element_at(x3 / 32, y3 / 32);
|
||||
while(map_element_get_type(map_element) != MAP_ELEMENT_TYPE_SCENERY_MULTIPLE ||
|
||||
|
@ -1031,7 +1037,7 @@ void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* ed
|
|||
map_element->properties.scenerymultiple.colour[1] |= color2;
|
||||
map_invalidate_tile_full(x3, y3);
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
*ebx = 0;
|
||||
|
@ -1059,6 +1065,8 @@ void game_command_set_banner_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(*ebx & GAME_COMMAND_FLAG_APPLY){
|
||||
rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32);
|
||||
while(map_element->type != MAP_ELEMENT_TYPE_BANNER ||
|
||||
|
@ -1076,7 +1084,7 @@ void game_command_set_banner_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
|||
gBanners[map_element->properties.banner.index].colour = color;
|
||||
map_invalidate_tile(x, y, z, z + 32);
|
||||
}
|
||||
}
|
||||
|
||||
*ebx = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue