Merge branch 'master' of https://github.com/Anuken/Mindustry into 6.0
# Conflicts: # core/src/mindustry/graphics/Bloom.java # gradle.properties
This commit is contained in:
@@ -55,7 +55,7 @@ public class Predict{
|
||||
* See {@link #intercept(float, float, float, float, float, float, float)}.
|
||||
*/
|
||||
public static Vec2 intercept(TargetTrait src, TargetTrait dst, float v){
|
||||
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.getTargetVelocityX() - src.getTargetVelocityX()/2f, dst.getTargetVelocityY() - src.getTargetVelocityY()/2f, v);
|
||||
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), dst.getTargetVelocityX() - src.getTargetVelocityX()/(2f*Time.delta()), dst.getTargetVelocityY() - src.getTargetVelocityY()/(2f*Time.delta()), v);
|
||||
}
|
||||
|
||||
private static Vec2 quad(float a, float b, float c){
|
||||
|
||||
@@ -27,7 +27,7 @@ import static mindustry.Vars.*;
|
||||
public class Lightning extends TimedEntity implements DrawTrait, TimeTrait{
|
||||
public static final float lifetime = 10f;
|
||||
|
||||
private static final RandomXS128 random = new RandomXS128();
|
||||
private static final Rand random = new Rand();
|
||||
private static final Rect rect = new Rect();
|
||||
private static final Array<Unit> entities = new Array<>();
|
||||
private static final IntSet hit = new IntSet();
|
||||
|
||||
@@ -48,8 +48,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
public float baseRotation;
|
||||
public float pointerX, pointerY;
|
||||
public String name = "noname";
|
||||
public @Nullable
|
||||
String uuid, usid;
|
||||
public @Nullable String uuid, usid;
|
||||
public boolean isAdmin, isTransferring, isShooting, isBoosting, isMobile, isTyping, isBuilding = true;
|
||||
public boolean buildWasAutoPaused = false;
|
||||
public float boostHeat, shootHeat, destructTime;
|
||||
@@ -350,13 +349,13 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
public void drawBackItems(){
|
||||
drawBackItems(itemtime, isLocal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawStats(){
|
||||
Draw.color(Color.black, team.color, healthf() + Mathf.absin(Time.time(), healthf() * 5f, 1f - healthf()));
|
||||
Draw.rect(getPowerCellRegion(), x + Angles.trnsx(rotation, mech.cellTrnsY, 0f), y + Angles.trnsy(rotation, mech.cellTrnsY, 0f), rotation - 90);
|
||||
Draw.reset();
|
||||
drawBackItems(itemtime, isLocal);
|
||||
drawLight();
|
||||
mech.drawStats(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -252,6 +252,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
Tile tile = world.tileWorld(x, y);
|
||||
|
||||
status.update(this);
|
||||
item.amount = Mathf.clamp(this.item.amount, 0, getItemCapacity());
|
||||
|
||||
velocity.limit(maxVelocity()).scl(1f + (status.getSpeedMultiplier() - 1f) * Time.delta());
|
||||
|
||||
@@ -341,6 +342,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
public void addItem(Item item, int amount){
|
||||
this.item.amount = this.item.item == item ? this.item.amount + amount : amount;
|
||||
this.item.item = item;
|
||||
this.item.amount = Mathf.clamp(this.item.amount, 0, getItemCapacity());
|
||||
}
|
||||
|
||||
public void clearItem(){
|
||||
|
||||
Reference in New Issue
Block a user