Added freebuild / Power system fix / Net packet pool fix / Crash fixes

This commit is contained in:
Anuken
2018-07-04 11:38:59 -04:00
parent 12f444750c
commit 76d0285e3f
34 changed files with 124 additions and 110 deletions

View File

@@ -353,7 +353,7 @@ public class MobileInput extends InputHandler implements GestureListener{
if(tile != null){
//draw placing
if(mode == placing) {
if(mode == placing && recipe != null) {
NormalizeDrawResult dresult = PlaceUtils.normalizeDrawArea(recipe.result, lineStartX, lineStartY, tile.x, tile.y, true, maxLength, lineScale);
Lines.rect(dresult.x, dresult.y, dresult.x2 - dresult.x, dresult.y2 - dresult.y);
@@ -465,7 +465,7 @@ public class MobileInput extends InputHandler implements GestureListener{
if (tile == null) return false;
if(mode == placing) {
if(mode == placing && recipe != null) {
//normalize area
NormalizeResult result = PlaceUtils.normalizeArea(lineStartX, lineStartY, tile.x, tile.y, rotation, true, 100);
@@ -599,6 +599,10 @@ public class MobileInput extends InputHandler implements GestureListener{
selection.clear();
}
if(lineMode && mode == placing && recipe == null){
lineMode = false;
}
//if there is no mode and there's a recipe, switch to placing
if(recipe != null && mode == none){
mode = placing;