Fix plugin get car entities returning null elements (#11988)

This commit is contained in:
Olivier Wervers authored and GitHub committed 2020-06-18 21:50:06 +01:00
1 parent ab9b8cd57e
commit e280b413c0
1 file changed
+1 -1
+1 -1
View File
@@ -148,8 +148,8 @@ namespace OpenRCT2::Scripting
for (auto carId = sprite->sprite_index; carId != SPRITE_INDEX_NULL;)
{
auto car = GetEntity<Vehicle>(carId);
carId = car->next_vehicle_on_train;
result.push_back(GetObjectAsDukValue(_context, std::make_shared<ScVehicle>(carId)));
carId = car->next_vehicle_on_train;
}
}
else