Fixed player rotation not being sent on Android
This commit is contained in:
@@ -105,10 +105,6 @@ public class Player extends SyncEntity{
|
||||
|
||||
@Override
|
||||
public void drawSmooth(){
|
||||
if(isAndroid && isLocal){
|
||||
angle = Mathf.lerpAngDelta(angle, targetAngle, 0.2f);
|
||||
}
|
||||
|
||||
if((debug && (!showPlayer || !showUI)) || (isAndroid && isLocal) || (dead && !isLocal)) return;
|
||||
boolean snap = snapCamera && Settings.getBool("smoothcam") && Settings.getBool("pixelate") && isLocal;
|
||||
|
||||
@@ -145,6 +141,9 @@ public class Player extends SyncEntity{
|
||||
@Override
|
||||
public void update(){
|
||||
if(!isLocal || isAndroid){
|
||||
if(isAndroid && isLocal){
|
||||
angle = Mathf.lerpAngDelta(angle, targetAngle, 0.2f);
|
||||
}
|
||||
if(!isLocal) interpolate();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public abstract class SyncEntity extends DestructibleEntity{
|
||||
|
||||
@Override
|
||||
public final void draw(){
|
||||
float x = this.x, y = this.y, angle = this.angle;
|
||||
final float x = this.x, y = this.y, angle = this.angle;
|
||||
|
||||
//interpolates data at low tick speeds.
|
||||
if(isSmoothing()){
|
||||
|
||||
@@ -52,7 +52,7 @@ public class GestureHandler extends GestureAdapter{
|
||||
float dx = deltaX*Core.camera.zoom/Core.cameraScale, dy = deltaY*Core.camera.zoom/Core.cameraScale;
|
||||
player.x -= dx;
|
||||
player.y += dy;
|
||||
player.targetAngle = Mathf.atan2(dx, -dy);
|
||||
player.targetAngle = Mathf.atan2(dx, -dy) + 180f;
|
||||
}else if(control.input().placeMode.lockCamera && (control.input().placeMode.pan && control.input().recipe != null)){
|
||||
input.mousex += deltaX;
|
||||
input.mousey += deltaY;
|
||||
|
||||
Reference in New Issue
Block a user