Fixed shaky camera, many other small bugs

This commit is contained in:
Anuken
2018-05-30 23:51:42 -04:00
parent fae7bfa8c5
commit 857b76980b
12 changed files with 81 additions and 36 deletions
@@ -145,7 +145,7 @@ public class Player extends Unit implements BlockBuilder {
public void drawSmooth(){
if((debug && (!showPlayer || !showUI)) || dead) return;
boolean snap = snapCamera && Settings.getBool("smoothcam") && Settings.getBool("pixelate") && isLocal;
boolean snap = snapCamera && isLocal;
String mname = mech.name;
@@ -407,6 +407,16 @@ public class Player extends Unit implements BlockBuilder {
rotation = Mathf.slerpDelta(rotation, targetAngle, 0.1f);
}
@Override
public Player set(float x, float y){
this.x = x;
this.y = y;
if(mobile && !isLocal){
Core.camera.position.set(x, y, 0f);
}
return this;
}
@Override
public boolean acceptsAmmo(Item item) {
return weapon.getAmmoType(item) != null && inventory.canAcceptAmmo(weapon.getAmmoType(item));