Fix 5079 don't remove walls when building stalls and footpaths

This commit is contained in:
Broxzier 2017-01-15 14:14:08 +01:00 committed by Michał Janiszewski
parent 77a0c141a7
commit 2235390ce2
2 changed files with 3 additions and 3 deletions

View File

@ -1118,7 +1118,7 @@ static money32 track_place(sint32 rideIndex, sint32 type, sint32 originX, sint32
//6c53dc
if ((flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST)) {
if ((flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsDisableClearanceChecks) {
footpath_remove_litter(x, y, z);
if (rideTypeFlags & RIDE_TYPE_FLAG_TRACK_NO_WALLS) {
map_remove_walls_at(x, y, baseZ * 8, clearanceZ * 8);
@ -1219,7 +1219,7 @@ static money32 track_place(sint32 rideIndex, sint32 type, sint32 originX, sint32
if (entranceDirections & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH) {
entranceDirections &= 0x0F;
if (entranceDirections != 0) {
if (!(flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST)) {
if (!(flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsDisableClearanceChecks) {
uint8 _bl = entranceDirections;
for (sint32 dl = bitscanforward(_bl); dl != -1; dl = bitscanforward(_bl)){
_bl &= ~(1 << dl);

View File

@ -891,7 +891,7 @@ static void window_footpath_construct()
gGameCommandErrorTitle = STR_CANT_BUILD_FOOTPATH_HERE;
money32 cost = footpath_place(type, x, y, z, slope, 0);
if (cost != MONEY32_UNDEFINED) {
if (cost != MONEY32_UNDEFINED && !gCheatsDisableClearanceChecks) {
// It is possible, let's remove walls between the old and new piece of path
uint8 direction = gFootpathConstructDirection;
map_remove_intersecting_walls(x, y, z, z + 4 + ((slope & 0xf) ? 2 : 0), direction ^ 2);