Fixed many placement mode bugs
This commit is contained in:
@@ -20,9 +20,9 @@ public class AndroidInput extends InputHandler{
|
||||
public float lmousex, lmousey;
|
||||
public float mousex, mousey;
|
||||
public boolean brokeBlock = false;
|
||||
public boolean placing = false;
|
||||
|
||||
private boolean enableHold = false;
|
||||
private boolean placing = false;
|
||||
private float warmup;
|
||||
private float warmupDelay = 20;
|
||||
|
||||
@@ -48,6 +48,7 @@ public class AndroidInput extends InputHandler{
|
||||
}else if(pointer == 0 && !breakMode.pan && breaking() && drawPlace()){
|
||||
breakMode.released(getBlockX(), getBlockY(), getBlockEndX(), getBlockEndY());
|
||||
}
|
||||
|
||||
placing = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class GestureHandler extends GestureAdapter{
|
||||
if(control.showCursor() && !Inputs.keyDown("select")) return false;
|
||||
|
||||
if(!control.showCursor() && !(control.input().recipe != null
|
||||
&& state.inventory.hasItems(control.input().recipe.requirements) && control.input().placeMode.lockCamera) &&
|
||||
&& control.input().placeMode.lockCamera) &&
|
||||
!(control.input().recipe == null && control.input().breakMode.lockCamera)){
|
||||
float dx = deltaX*Core.camera.zoom/Core.cameraScale, dy = deltaY*Core.camera.zoom/Core.cameraScale;
|
||||
player.x -= dx;
|
||||
|
||||
@@ -164,7 +164,6 @@ public enum PlaceMode{
|
||||
}
|
||||
|
||||
public void released(int tilex, int tiley, int endx, int endy){
|
||||
|
||||
process(tilex, tiley, endx, endy);
|
||||
tilex = this.tilex; tiley = this.tiley;
|
||||
endx = this.endx; endy = this.endy;
|
||||
|
||||
Reference in New Issue
Block a user