Fixed off-by-one team sprite in editor
This commit is contained in:
@@ -139,12 +139,16 @@ public class MapRenderer implements Disposable{
|
|||||||
mesh.draw(idxWall, region, wx * tilesize, wy * tilesize, 8, 8);
|
mesh.draw(idxWall, region, wx * tilesize, wy * tilesize, 8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
float offsetX = -(wall.size / 3) * tilesize, offsetY = -(wall.size / 3) * tilesize;
|
float offsetX = -((wall.size + 1) / 3) * tilesize, offsetY = -((wall.size + 1) / 3) * tilesize;
|
||||||
|
|
||||||
//draw non-synthetic wall or ore
|
//draw non-synthetic wall or ore
|
||||||
if((wall.update || wall.destructible) && center){
|
if((wall.update || wall.destructible) && center){
|
||||||
mesh.setColor(team.color);
|
mesh.setColor(team.color);
|
||||||
region = Core.atlas.find("block-border-editor");
|
region = Core.atlas.find("block-border-editor");
|
||||||
|
if(wall.size == 2){
|
||||||
|
offsetX += tilesize;
|
||||||
|
offsetY += tilesize;
|
||||||
|
}
|
||||||
}else if(!useSyntheticWall && wall != Blocks.air && center){
|
}else if(!useSyntheticWall && wall != Blocks.air && center){
|
||||||
region = getIcon(wall, idxWall);
|
region = getIcon(wall, idxWall);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user