mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix large scenery ghost issue.
This commit is contained in:
parent
d5ffaefdf0
commit
4d56572fd4
|
@ -765,6 +765,10 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
if ((map_element->type & MAP_ELEMENT_DIRECTION_MASK) != map_element_direction)
|
||||
continue;
|
||||
|
||||
// If we are removing ghost elements
|
||||
if((*ebx & 0x40) && !(map_element->flags & MAP_ELEMENT_FLAG_GHOST))
|
||||
continue;
|
||||
|
||||
element_found = 1;
|
||||
break;
|
||||
} while (!map_element_is_last_for_tile(map_element++));
|
||||
|
@ -774,11 +778,6 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
return;
|
||||
}
|
||||
|
||||
if((*ebx & 0x40) && !(map_element->flags & MAP_ELEMENT_FLAG_GHOST)){
|
||||
*ebx = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
map_element_remove_banner_entry(map_element);
|
||||
|
||||
int ecx2 = map_element->properties.scenerymultiple.type >> 10;
|
||||
|
@ -835,6 +834,10 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
if (sceneryElement->base_height != currentTile.z / 8)
|
||||
continue;
|
||||
|
||||
// If we are removing ghost elements
|
||||
if ((*ebx & 0x40) && !(sceneryElement->flags & MAP_ELEMENT_FLAG_GHOST))
|
||||
continue;
|
||||
|
||||
map_invalidate_tile_full(currentTile.x, currentTile.y);
|
||||
map_element_remove(sceneryElement);
|
||||
tile_not_found = 0;
|
||||
|
|
Loading…
Reference in New Issue