Fixed mobile breaking not taking into account multiblocks

This commit is contained in:
Anuken
2018-07-03 10:47:33 -04:00
parent a683866397
commit 7e6807509b

View File

@@ -568,8 +568,9 @@ public class MobileInput extends InputHandler implements GestureListener{
}else if(mode == placing && isPlacing() && validPlace(cursor.x, cursor.y, recipe.result, rotation) && !checkOverlapPlacement(cursor.x, cursor.y, recipe.result)){
//add to selection queue if it's a valid place position
selection.add(lastPlaced = new PlaceRequest(cursor.worldx(), cursor.worldy(), recipe, rotation));
}else if(mode == breaking && validBreak(cursor.x, cursor.y) && !hasRequest(cursor)) {
}else if(mode == breaking && validBreak(cursor.target().x, cursor.target().y) && !hasRequest(cursor.target())) {
//add to selection queue if it's a valid BREAK position
cursor = cursor.target();
selection.add(new PlaceRequest(cursor.worldx(), cursor.worldy()));
}else{ //else, try and carry units
if(player.getCarry() != null){