Added rebuild region key on desktop

This commit is contained in:
Anuken
2022-10-30 16:46:36 -04:00
parent 65f1780dcc
commit 8459e68cfa
7 changed files with 73 additions and 19 deletions

View File

@@ -376,12 +376,14 @@ public class Placement{
}
}
if(Math.abs(endx - tilex) > maxLength){
endx = Mathf.sign(endx - tilex) * maxLength + tilex;
}
if(maxLength > 0){
if(Math.abs(endx - tilex) > maxLength){
endx = Mathf.sign(endx - tilex) * maxLength + tilex;
}
if(Math.abs(endy - tiley) > maxLength){
endy = Mathf.sign(endy - tiley) * maxLength + tiley;
if(Math.abs(endy - tiley) > maxLength){
endy = Mathf.sign(endy - tiley) * maxLength + tiley;
}
}
int dx = endx - tilex, dy = endy - tiley;