1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-21 23:03:04 +01:00

Fix tile element scripting

This commit is contained in:
Ted John
2020-02-11 23:25:19 +00:00
parent 4b95a3a9d0
commit ab5bfffde0
3 changed files with 56 additions and 496 deletions

View File

@@ -52,8 +52,9 @@ namespace OpenRCT2::Scripting
std::shared_ptr<ScTile> getTile(int32_t x, int32_t y)
{
auto firstElement = map_get_first_element_at({ x, y });
return std::make_shared<ScTile>(firstElement);
auto coords = TileCoordsXY(x, y).ToCoordsXY();
auto firstElement = map_get_first_element_at(coords);
return std::make_shared<ScTile>(coords, firstElement);
}
std::shared_ptr<ScThing> getThing(int32_t id)