v0.4.2: fixed a bug with tilemap culling on maps that aren't square
This commit is contained in:
parent
98b5fe0394
commit
5ad6c69e93
|
@ -241,7 +241,7 @@ public class Tilemap extends Visual {
|
||||||
topLeft++;
|
topLeft++;
|
||||||
|
|
||||||
bottomRight = Math.min(camX+camW, mapWidth-1)
|
bottomRight = Math.min(camX+camW, mapWidth-1)
|
||||||
+ Math.min((camY+camH)*mapWidth, mapHeight*(mapWidth-1));
|
+ Math.min((camY+camH)*mapWidth, (mapHeight-1)*mapWidth);
|
||||||
while(bufferPositions[bottomRight] == -1)
|
while(bufferPositions[bottomRight] == -1)
|
||||||
bottomRight--;
|
bottomRight--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user