1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Final fix of #2151.

Large Scenery, land, water now also force a retry of track placement. Small scenery, walls do not block tracks so do not require this.
This commit is contained in:
duncanspumpkin
2015-11-10 21:34:09 +00:00
parent 54ff0b2045
commit 77699e99e5

View File

@@ -1844,6 +1844,9 @@ money32 raise_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b
}
}
// Force ride construction to recheck area
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, uint32) = x;
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint32) = y;
@@ -1908,6 +1911,9 @@ money32 lower_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b
}
}
// Force ride construction to recheck area
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_X, uint32) = x;
RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint32) = y;
@@ -1979,6 +1985,9 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags)
sound_play_panned(SOUND_LAYING_OUT_WATER, 0x8001, x, y, z);
}
// Force ride construction to recheck area
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
return cost;
}
@@ -2041,6 +2050,9 @@ money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags)
sound_play_panned(SOUND_LAYING_OUT_WATER, 0x8001, x, y, z);
}
// Force ride construction to recheck area
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
return cost;
}
@@ -3481,6 +3493,10 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in
tile++;
tile_num++;
}while(1);
// Force ride construction to recheck area
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
*ebx = (scenery_entry->large_scenery.price * 10) + RCT2_GLOBAL(0x00F4389A, uint32);
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
*ebx = 0;