1
0
Fork 0

Codefix: Orthogonal tile area expanding should end within map bounds

pull/13973/head
SamuXarick 2025-04-06 22:48:53 +01:00
parent 981b2a94db
commit 137c7c4925
1 changed files with 2 additions and 2 deletions

View File

@ -127,8 +127,8 @@ OrthogonalTileArea &OrthogonalTileArea::Expand(int rad)
int sx = std::max<int>(x - rad, 0); int sx = std::max<int>(x - rad, 0);
int sy = std::max<int>(y - rad, 0); int sy = std::max<int>(y - rad, 0);
int ex = std::min<int>(x + this->w + rad, Map::SizeX()); int ex = std::min<int>(x + this->w + rad, Map::MaxX());
int ey = std::min<int>(y + this->h + rad, Map::SizeY()); int ey = std::min<int>(y + this->h + rad, Map::MaxY());
this->tile = TileXY(sx, sy); this->tile = TileXY(sx, sy);
this->w = ex - sx; this->w = ex - sx;