Bugfixes
This commit is contained in:
@@ -178,11 +178,11 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
|
||||
public byte absoluteRelativeTo(int cx, int cy){
|
||||
int x = tile.x, y = tile.y;
|
||||
if(Math.abs(x - cx) > Math.abs(y - cy)){
|
||||
if(x <= cx - 1 && y == cy) return 0;
|
||||
if(x >= cx + 1 && y == cy) return 2;
|
||||
if(x <= cx - 1) return 0;
|
||||
if(x >= cx + 1) return 2;
|
||||
}else{
|
||||
if(x == cx && y <= cy - 1) return 1;
|
||||
if(x == cx && y >= cy + 1) return 3;
|
||||
if(y <= cy - 1) return 1;
|
||||
if(y >= cy + 1) return 3;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user