forked from rosebudai/OpenRCT2-Web
Remove direct calls to Execute Query on action.
This commit is contained in:
1 parent
22811e0e85
commit
60ec1da0f8
1 file changed
+9
-4
@@ -1328,8 +1328,10 @@ static money32 lower_land(
|
||||
newSlope &= TILE_ELEMENT_SURFACE_SLOPE_MASK;
|
||||
|
||||
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)
|
||||
{
|
||||
return MONEY32_UNDEFINED;
|
||||
@@ -1580,7 +1582,9 @@ static money32 smooth_land_tile(
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -1725,8 +1729,9 @@ static money32 smooth_land_row_by_edge(
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
totalCost += res->Cost;
|
||||
|
||||
Reference in new issue
Block a user