mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix ClearAction breaking out of the loop too early.
This commit is contained in:
@@ -158,11 +158,11 @@ private:
|
|||||||
auto res = executing ? GameActions::ExecuteNested(&footpathRemoveAction)
|
auto res = executing ? GameActions::ExecuteNested(&footpathRemoveAction)
|
||||||
: GameActions::QueryNested(&footpathRemoveAction);
|
: GameActions::QueryNested(&footpathRemoveAction);
|
||||||
|
|
||||||
if (res->Error != GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
return MONEY32_UNDEFINED;
|
{
|
||||||
|
totalCost += res->Cost;
|
||||||
totalCost += res->Cost;
|
tileEdited = executing;
|
||||||
tileEdited = executing;
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
|
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
|
||||||
@@ -176,11 +176,11 @@ private:
|
|||||||
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
||||||
: GameActions::QueryNested(&removeSceneryAction);
|
: GameActions::QueryNested(&removeSceneryAction);
|
||||||
|
|
||||||
if (res->Error != GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
return MONEY32_UNDEFINED;
|
{
|
||||||
|
totalCost += res->Cost;
|
||||||
totalCost += res->Cost;
|
tileEdited = executing;
|
||||||
tileEdited = executing;
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TILE_ELEMENT_TYPE_WALL:
|
case TILE_ELEMENT_TYPE_WALL:
|
||||||
@@ -193,11 +193,11 @@ private:
|
|||||||
auto res = executing ? GameActions::ExecuteNested(&wallRemoveAction)
|
auto res = executing ? GameActions::ExecuteNested(&wallRemoveAction)
|
||||||
: GameActions::QueryNested(&wallRemoveAction);
|
: GameActions::QueryNested(&wallRemoveAction);
|
||||||
|
|
||||||
if (res->Error != GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
return MONEY32_UNDEFINED;
|
{
|
||||||
|
totalCost += res->Cost;
|
||||||
totalCost += res->Cost;
|
tileEdited = executing;
|
||||||
tileEdited = executing;
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TILE_ELEMENT_TYPE_LARGE_SCENERY:
|
case TILE_ELEMENT_TYPE_LARGE_SCENERY:
|
||||||
@@ -211,11 +211,11 @@ private:
|
|||||||
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
auto res = executing ? GameActions::ExecuteNested(&removeSceneryAction)
|
||||||
: GameActions::QueryNested(&removeSceneryAction);
|
: GameActions::QueryNested(&removeSceneryAction);
|
||||||
|
|
||||||
if (res->Error != GA_ERROR::OK)
|
if (res->Error == GA_ERROR::OK)
|
||||||
return MONEY32_UNDEFINED;
|
{
|
||||||
|
totalCost += res->Cost;
|
||||||
totalCost += res->Cost;
|
tileEdited = executing;
|
||||||
tileEdited = executing;
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user