Skip to content

Commit 6c7ddd4

Browse files
committed
Fix water buildings getting corrupted on collapse
Fixes #780
1 parent 62d0a3f commit 6c7ddd4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/map/orientation.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ void map_orientation_update_buildings(void)
237237
int orientation_is_top_bottom = map_orientation == DIR_0_TOP || map_orientation == DIR_4_BOTTOM;
238238
for (int i = 1; i < MAX_BUILDINGS; i++) {
239239
building *b = building_get(i);
240-
if (b->state == BUILDING_STATE_UNUSED || b->state == BUILDING_STATE_DELETED_BY_GAME) {
240+
if (b->state == BUILDING_STATE_UNUSED || b->state == BUILDING_STATE_DELETED_BY_GAME ||
241+
b->state == BUILDING_STATE_RUBBLE) {
241242
continue;
242243
}
243244
int image_id;

0 commit comments

Comments
 (0)