1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 03:05:24 +01:00

Fix errors after rebase

This commit is contained in:
Ted John
2020-04-17 18:41:23 +01:00
parent b9f3886ca8
commit f12f439309
3 changed files with 5 additions and 5 deletions

View File

@@ -133,7 +133,7 @@ namespace OpenRCT2::Scripting
auto viewport = GetViewport();
if (viewport != nullptr)
{
return viewport->zoom;
return static_cast<int8_t>(viewport->zoom);
}
return 0;
}

View File

@@ -109,7 +109,7 @@ namespace OpenRCT2::Scripting
}
if (type == "car")
{
targetList = SPRITE_LIST_VEHICLE_HEAD;
targetList = SPRITE_LIST_TRAIN_HEAD;
}
else if (type == "litter")
{
@@ -147,7 +147,7 @@ namespace OpenRCT2::Scripting
{
result.push_back(GetObjectAsDukValue(_context, std::make_shared<ScPeep>(spriteId)));
}
else if (targetList == SPRITE_LIST_VEHICLE_HEAD)
else if (targetList == SPRITE_LIST_TRAIN_HEAD)
{
auto carId = spriteId;
while (carId != SPRITE_INDEX_NULL)

View File

@@ -969,7 +969,7 @@ namespace OpenRCT2::Scripting
if (numElements > currentNumElements)
{
// Allocate space for the extra tile elements (inefficient but works)
auto pos = TileCoordsXYZ(TileCoordsXY(_coords), 0);
auto pos = TileCoordsXYZ(TileCoordsXY(_coords), 0).ToCoordsXYZ();
auto numToInsert = numElements - currentNumElements;
for (size_t i = 0; i < numToInsert; i++)
{
@@ -1017,7 +1017,7 @@ namespace OpenRCT2::Scripting
{
std::vector<TileElement> data(first, first + origNumElements);
auto pos = TileCoordsXYZ(TileCoordsXY(_coords), 0);
auto pos = TileCoordsXYZ(TileCoordsXY(_coords), 0).ToCoordsXYZ();
auto newElement = tile_element_insert(pos, 0);
if (newElement == nullptr)
{