1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00

Fix function.

This commit is contained in:
duncanspumpkin
2019-03-28 17:45:39 +00:00
parent 29f5018bd1
commit 7e6254f30c
3 changed files with 12 additions and 8 deletions

View File

@@ -1823,7 +1823,10 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
break;
}
gSceneryPlaceZ += 8;
if (zAttemptRange != 1)
{
gSceneryPlaceZ += 8;
}
}
auto primaryColour = (parameter_2 >> 8) & 0xFF;
@@ -2511,8 +2514,9 @@ static money32 try_place_ghost_scenery(
auto type = (parameter_1 >> 8) & 0xFF;
auto wallPlaceAction = WallPlaceAction(
type, { map_tile.x, map_tile.y, gSceneryPlaceZ }, edges, primaryColour, _secondaryColour, _tertiaryColour);
wallPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED);
wallPlaceAction.SetCallback([=](const GameAction* ga, const GameActionResult* result){
wallPlaceAction.SetFlags(
GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_PATH_SCENERY);
wallPlaceAction.SetCallback([=](const GameAction* ga, const GameActionResult* result) {
if (result->Error != GA_ERROR::OK)
return;

View File

@@ -409,9 +409,8 @@ int32_t game_do_command_p(
// Remove ghost scenery so it doesn't interfere with incoming network command
if ((flags & GAME_COMMAND_FLAG_NETWORKED) && !(flags & GAME_COMMAND_FLAG_GHOST)
&& (command == GAME_COMMAND_PLACE_SCENERY
|| command == GAME_COMMAND_PLACE_LARGE_SCENERY || command == GAME_COMMAND_PLACE_BANNER
|| command == GAME_COMMAND_PLACE_PATH))
&& (command == GAME_COMMAND_PLACE_SCENERY || command == GAME_COMMAND_PLACE_LARGE_SCENERY
|| command == GAME_COMMAND_PLACE_BANNER || command == GAME_COMMAND_PLACE_PATH))
{
scenery_remove_ghost_tool_placement();
}
@@ -611,8 +610,7 @@ void game_log_multiplayer_command(int command, const int* eax, const int* ebx, c
format_string(log_msg, 256, STR_LOG_DEMOLISH_RIDE, args);
network_append_server_log(log_msg);
}
else if (command == GAME_COMMAND_PLACE_LARGE_SCENERY
|| command == GAME_COMMAND_PLACE_BANNER)
else if (command == GAME_COMMAND_PLACE_LARGE_SCENERY || command == GAME_COMMAND_PLACE_BANNER)
{
uint8_t flags = *ebx & 0xFF;
if (flags & GAME_COMMAND_FLAG_GHOST)

View File

@@ -558,6 +558,8 @@ private:
int32_t elementType = tileElement->GetType();
if (elementType == TILE_ELEMENT_TYPE_SURFACE)
continue;
if (tileElement->IsGhost())
continue;
if (z0 >= tileElement->clearance_height)
continue;
if (z1 <= tileElement->base_height)