1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix SmallSceneryRemoveAction returning no error on invalid coordinates.

This commit is contained in:
Matt
2019-02-17 09:52:18 +01:00
parent 5f02c480c2
commit 597b0956fc

View File

@@ -104,8 +104,7 @@ public:
TileElement* tileElement = FindSceneryElement();
if (tileElement == nullptr)
{
res->Cost = 0;
return res;
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
}
return res;
@@ -130,8 +129,7 @@ public:
TileElement* tileElement = FindSceneryElement();
if (tileElement == nullptr)
{
res->Cost = 0;
return res;
return MakeResult(GA_ERROR::INVALID_PARAMETERS, STR_CANT_REMOVE_THIS, STR_INVALID_SELECTION_OF_OBJECTS);
}
res->Position.z = tile_element_height(res->Position.x, res->Position.y);