mirror of https://github.com/OpenRCT2/OpenRCT2.git
Added zero clearance to track placement.
Due to how track placement works you need to hold down shift when placing the track. Ignore the ghost placement. Also disable support limits is enabled.
This commit is contained in:
parent
da3be49f34
commit
529a4da8e3
|
@ -3609,8 +3609,9 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
||||||
|
|
||||||
RCT2_GLOBAL(0x00F44060, void*) = &clearance_struct;
|
RCT2_GLOBAL(0x00F44060, void*) = &clearance_struct;
|
||||||
|
|
||||||
if (!map_can_construct_with_clear_at(x, y, baseZ, clearanceZ, (void*)0x006C5A5F, bl)) {
|
if (!gCheatsDisableClearanceChecks || flags & (1 << 6)){
|
||||||
return MONEY32_UNDEFINED;
|
if (!map_can_construct_with_clear_at(x, y, baseZ, clearanceZ, (void*)0x006C5A5F, bl))
|
||||||
|
return MONEY32_UNDEFINED;
|
||||||
}
|
}
|
||||||
// Again when 0x006C5A5F implemented remove this.
|
// Again when 0x006C5A5F implemented remove this.
|
||||||
cost = clearance_struct.cost;
|
cost = clearance_struct.cost;
|
||||||
|
@ -3741,16 +3742,18 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
||||||
}
|
}
|
||||||
//6c5648 12 push
|
//6c5648 12 push
|
||||||
mapElement = map_get_surface_element_at(x / 32, y / 32);
|
mapElement = map_get_surface_element_at(x / 32, y / 32);
|
||||||
int ride_height = clearanceZ - mapElement->base_height;
|
if (!gCheatsDisableSupportLimits){
|
||||||
if (ride_height >= 0) {
|
int ride_height = clearanceZ - mapElement->base_height;
|
||||||
int maxHeight = rideEntry->max_height;
|
if (ride_height >= 0) {
|
||||||
if (maxHeight == 0) {
|
int maxHeight = rideEntry->max_height;
|
||||||
maxHeight = RCT2_GLOBAL(0x0097D218 + (ride->type * 8), uint8);
|
if (maxHeight == 0) {
|
||||||
}
|
maxHeight = RCT2_GLOBAL(0x0097D218 + (ride->type * 8), uint8);
|
||||||
ride_height /= 2;
|
}
|
||||||
if (ride_height > maxHeight && !(RCT2_GLOBAL(0x009D8150, uint8) & 1)) {
|
ride_height /= 2;
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_HIGH_FOR_SUPPORTS;
|
if (ride_height > maxHeight && !(RCT2_GLOBAL(0x009D8150, uint8) & 1)) {
|
||||||
return MONEY32_UNDEFINED;
|
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_HIGH_FOR_SUPPORTS;
|
||||||
|
return MONEY32_UNDEFINED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue