mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Fix: Incorrect assertion in GetTileIndexFromLocalCoordinate (#11747)
This commit is contained in:
parent
8f2266f0ed
commit
86b046cd26
@ -191,7 +191,7 @@ std::vector<WaterRegion> _water_regions;
|
|||||||
|
|
||||||
TileIndex GetTileIndexFromLocalCoordinate(int region_x, int region_y, int local_x, int local_y)
|
TileIndex GetTileIndexFromLocalCoordinate(int region_x, int region_y, int local_x, int local_y)
|
||||||
{
|
{
|
||||||
assert(local_x >= 0 && local_y < WATER_REGION_EDGE_LENGTH);
|
assert(local_x >= 0 && local_x < WATER_REGION_EDGE_LENGTH);
|
||||||
assert(local_y >= 0 && local_y < WATER_REGION_EDGE_LENGTH);
|
assert(local_y >= 0 && local_y < WATER_REGION_EDGE_LENGTH);
|
||||||
return TileXY(WATER_REGION_EDGE_LENGTH * region_x + local_x, WATER_REGION_EDGE_LENGTH * region_y + local_y);
|
return TileXY(WATER_REGION_EDGE_LENGTH * region_x + local_x, WATER_REGION_EDGE_LENGTH * region_y + local_y);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user