1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Make litter_remove_at use CoordsXYZ

This commit is contained in:
Tulio Leao
2020-06-21 14:06:56 -03:00
parent e24de95b82
commit 7622ca513e
3 changed files with 6 additions and 6 deletions

View File

@@ -836,13 +836,13 @@ void litter_create(int32_t x, int32_t y, int32_t z, int32_t direction, int32_t t
*
* rct2: 0x006738E1
*/
void litter_remove_at(int32_t x, int32_t y, int32_t z)
void litter_remove_at(const CoordsXYZ& litterPos)
{
for (auto litter : EntityTileList<Litter>({ x, y }))
for (auto litter : EntityTileList<Litter>(litterPos))
{
if (abs(litter->z - z) <= 16)
if (abs(litter->z - litterPos.z) <= 16)
{
if (abs(litter->x - x) <= 8 && abs(litter->y - y) <= 8)
if (abs(litter->x - litterPos.x) <= 8 && abs(litter->y - litterPos.y) <= 8)
{
litter->Invalidate0();
sprite_remove(litter);