Fix large scenery ghost issue.

This commit is contained in:
Duncan Frost 2015-06-27 09:52:00 +01:00 committed by IntelOrca
parent d5ffaefdf0
commit 4d56572fd4
1 changed files with 8 additions and 5 deletions

View File

@ -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;