mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove direct calls to Execute Query on action.
This commit is contained in:
parent
22811e0e85
commit
60ec1da0f8
|
@ -1328,8 +1328,10 @@ static money32 lower_land(
|
||||||
newSlope &= TILE_ELEMENT_SURFACE_SLOPE_MASK;
|
newSlope &= TILE_ELEMENT_SURFACE_SLOPE_MASK;
|
||||||
|
|
||||||
auto landSetHeightAction = LandSetHeightAction({ x_coord, y_coord }, height, newSlope);
|
auto landSetHeightAction = LandSetHeightAction({ x_coord, y_coord }, height, newSlope);
|
||||||
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? landSetHeightAction.Execute() : landSetHeightAction.Query();
|
landSetHeightAction.SetFlags(flags);
|
||||||
|
|
||||||
|
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSetHeightAction, false)
|
||||||
|
: GameActions::Query(&landSetHeightAction, false);
|
||||||
if (res->Error != GA_ERROR::OK)
|
if (res->Error != GA_ERROR::OK)
|
||||||
{
|
{
|
||||||
return MONEY32_UNDEFINED;
|
return MONEY32_UNDEFINED;
|
||||||
|
@ -1580,7 +1582,9 @@ static money32 smooth_land_tile(
|
||||||
}
|
}
|
||||||
|
|
||||||
auto landSetHeightAction = LandSetHeightAction({ x, y }, targetBaseZ, slope);
|
auto landSetHeightAction = LandSetHeightAction({ x, y }, targetBaseZ, slope);
|
||||||
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? landSetHeightAction.Execute() : landSetHeightAction.Query();
|
landSetHeightAction.SetFlags(flags);
|
||||||
|
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSetHeightAction, false)
|
||||||
|
: GameActions::Query(&landSetHeightAction, false);
|
||||||
|
|
||||||
if (res->Error == GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
{
|
{
|
||||||
|
@ -1725,8 +1729,9 @@ static money32 smooth_land_row_by_edge(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto landSetHeightAction = LandSetHeightAction({ x, y }, targetBaseZ, slope);
|
auto landSetHeightAction = LandSetHeightAction({ x, y }, targetBaseZ, slope);
|
||||||
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? landSetHeightAction.Execute() : landSetHeightAction.Query();
|
landSetHeightAction.SetFlags(flags);
|
||||||
|
auto res = (flags & GAME_COMMAND_FLAG_APPLY) ? GameActions::Execute(&landSetHeightAction, false)
|
||||||
|
: GameActions::Query(&landSetHeightAction, false);
|
||||||
if (res->Error == GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
{
|
{
|
||||||
totalCost += res->Cost;
|
totalCost += res->Cost;
|
||||||
|
|
Loading…
Reference in New Issue