mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make Map::map_get_small_scenery_element_at() receive CoordsXY (#10406)
This commit is contained in:
parent
38cf4728ef
commit
5cd6c67abd
|
@ -90,7 +90,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
auto sceneryElement = map_get_small_scenery_element_at(_loc.x, _loc.y, _loc.z / 8, _sceneryType, _quadrant);
|
||||
auto sceneryElement = map_get_small_scenery_element_at(_loc, _sceneryType, _quadrant);
|
||||
|
||||
if (sceneryElement == nullptr)
|
||||
{
|
||||
|
|
|
@ -1852,9 +1852,10 @@ EntranceElement* map_get_ride_exit_element_at(const CoordsXYZ& exitCoords, bool
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
SmallSceneryElement* map_get_small_scenery_element_at(int32_t x, int32_t y, int32_t z, int32_t type, uint8_t quadrant)
|
||||
SmallSceneryElement* map_get_small_scenery_element_at(CoordsXYZ sceneryCoords, int32_t type, uint8_t quadrant)
|
||||
{
|
||||
TileElement* tileElement = map_get_first_element_at(x / 32, y / 32);
|
||||
auto sceneryTileCoords = TileCoordsXYZ{ sceneryCoords };
|
||||
TileElement* tileElement = map_get_first_element_at(sceneryTileCoords.x, sceneryTileCoords.y);
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
do
|
||||
|
@ -1863,7 +1864,7 @@ SmallSceneryElement* map_get_small_scenery_element_at(int32_t x, int32_t y, int3
|
|||
continue;
|
||||
if (tileElement->AsSmallScenery()->GetSceneryQuadrant() != quadrant)
|
||||
continue;
|
||||
if (tileElement->base_height != z)
|
||||
if (tileElement->base_height != sceneryTileCoords.z)
|
||||
continue;
|
||||
if (tileElement->AsSmallScenery()->GetEntryIndex() != type)
|
||||
continue;
|
||||
|
|
|
@ -144,7 +144,7 @@ BannerElement* map_get_banner_element_at(int32_t x, int32_t y, int32_t z, uint8_
|
|||
SurfaceElement* map_get_surface_element_at(const CoordsXY& coords);
|
||||
PathElement* map_get_path_element_at(const TileCoordsXYZ& loc);
|
||||
WallElement* map_get_wall_element_at(CoordsXYZD wallCoords);
|
||||
SmallSceneryElement* map_get_small_scenery_element_at(int32_t x, int32_t y, int32_t z, int32_t type, uint8_t quadrant);
|
||||
SmallSceneryElement* map_get_small_scenery_element_at(CoordsXYZ sceneryCoords, int32_t type, uint8_t quadrant);
|
||||
EntranceElement* map_get_park_entrance_element_at(const CoordsXYZ& entranceCoords, bool ghost);
|
||||
EntranceElement* map_get_ride_entrance_element_at(const CoordsXYZ& entranceCoords, bool ghost);
|
||||
EntranceElement* map_get_ride_exit_element_at(const CoordsXYZ& exitCoords, bool ghost);
|
||||
|
|
Loading…
Reference in New Issue