mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 01:04:50 +01:00
Fix #2151.
I think this fixes the issue but its hard to understand from the original issue.
This commit is contained in:
@@ -430,6 +430,12 @@ static void window_footpath_update_provisional_path_for_bridge_mode(rct_window *
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PATH_CONSTRUCTION_MODE, uint8) != PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL)
|
||||
return;
|
||||
|
||||
// Recheck area for construction. Set by ride_construction window
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & (1 << 2)) {
|
||||
footpath_provisional_remove();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) &= ~(1 << 2);
|
||||
}
|
||||
|
||||
// Update provisional bridge mode path
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & (1 << 1))) {
|
||||
footpath_get_next_path_info(&type, &x, &y, &z, &slope);
|
||||
|
||||
@@ -612,6 +612,8 @@ static void window_ride_construction_mouseup(rct_window *w, int widgetIndex)
|
||||
break;
|
||||
case WIDX_CONSTRUCT:
|
||||
window_ride_construction_construct(w);
|
||||
// Force any footpath construction to recheck the area.
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) |= (1 << 2);
|
||||
break;
|
||||
case WIDX_DEMOLISH:
|
||||
window_ride_construction_mouseup_demolish(w);
|
||||
@@ -2436,6 +2438,13 @@ void sub_6C94D8()
|
||||
{
|
||||
int x, y, z, direction, type, rideIndex, edxRS16;
|
||||
|
||||
// Recheck if area is fine for new track.
|
||||
// Set by footpath placement
|
||||
if (_currentTrackSelectionFlags & 8) {
|
||||
sub_6C9627();
|
||||
_currentTrackSelectionFlags &= ~8;
|
||||
}
|
||||
|
||||
switch (_rideConstructionState) {
|
||||
case RIDE_CONSTRUCTION_STATE_FRONT:
|
||||
case RIDE_CONSTRUCTION_STATE_BACK:
|
||||
|
||||
@@ -344,6 +344,9 @@ static money32 footpath_place_real(int type, int x, int y, int z, int slope, int
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
// Force ride construction to recheck area
|
||||
RCT2_GLOBAL(0x00F440B0, uint8) |= 8;
|
||||
|
||||
footpath_provisional_remove();
|
||||
mapElement = map_get_footpath_element_slope((x / 32), (y / 32), z, slope);
|
||||
if (mapElement == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user