Fixed deadlock / Crafter fixes / Autotile fixes / Low FPS ship fixes
This commit is contained in:
@@ -599,18 +599,13 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
}
|
||||
|
||||
movement.set(targetX - x, targetY - y).limit(mech.speed);
|
||||
movement.setAngle(Mathf.slerpDelta(movement.angle(), velocity.angle(), 0.05f));
|
||||
movement.setAngle(Mathf.slerp(movement.angle(), velocity.angle(), 0.05f));
|
||||
|
||||
if(distanceTo(targetX, targetY) < attractDst){
|
||||
movement.setZero();
|
||||
}
|
||||
|
||||
velocity.add(movement);
|
||||
updateVelocityStatus(mech.drag, mech.maxSpeed);
|
||||
|
||||
//hovering effect
|
||||
x += Mathf.sin(Timers.time() + id * 999, 25f, 0.08f);
|
||||
y += Mathf.cos(Timers.time() + id * 999, 25f, 0.08f);
|
||||
|
||||
if(velocity.len() <= 0.2f){
|
||||
rotation += Mathf.sin(Timers.time() + id * 99, 10f, 1f);
|
||||
@@ -618,6 +613,12 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
rotation = Mathf.slerpDelta(rotation, velocity.angle(), velocity.len()/10f);
|
||||
}
|
||||
|
||||
updateVelocityStatus(mech.drag, mech.maxSpeed);
|
||||
|
||||
//hovering effect
|
||||
x += Mathf.sin(Timers.time() + id * 999, 25f, 0.08f);
|
||||
y += Mathf.cos(Timers.time() + id * 999, 25f, 0.08f);
|
||||
|
||||
//update shooting if not building, not mining and there's ammo left
|
||||
if(!isBuilding() && inventory.hasAmmo() && getMineTile() == null){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user