mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-10 07:47:25 +07:00
Regression fixes
This commit is contained in:
Binary file not shown.
@ -21,6 +21,7 @@ public class Mindustry extends ApplicationCore{
|
|||||||
});
|
});
|
||||||
|
|
||||||
Time.mark();
|
Time.mark();
|
||||||
|
|
||||||
Vars.init();
|
Vars.init();
|
||||||
Log.setUseColors(false);
|
Log.setUseColors(false);
|
||||||
BundleLoader.load();
|
BundleLoader.load();
|
||||||
@ -34,8 +35,6 @@ public class Mindustry extends ApplicationCore{
|
|||||||
add(ui = new UI());
|
add(ui = new UI());
|
||||||
add(netServer = new NetServer());
|
add(netServer = new NetServer());
|
||||||
add(netClient = new NetClient());
|
add(netClient = new NetClient());
|
||||||
|
|
||||||
Events.fire(new GameLoadEvent());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -64,5 +63,6 @@ public class Mindustry extends ApplicationCore{
|
|||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
Log.info("Time to load [total]: {0}", Time.elapsed());
|
Log.info("Time to load [total]: {0}", Time.elapsed());
|
||||||
|
Events.fire(new GameLoadEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
//last distribution block placed
|
//last distribution block placed
|
||||||
private static int lastPlaced = -1;
|
private static int lastPlaced = -1;
|
||||||
|
|
||||||
protected Vector2 t1 = new Vector2();
|
protected Vector2 t1 = new Vector2(), t2 = new Vector2();
|
||||||
protected TextureRegion laser, laserEnd;
|
protected TextureRegion laser, laserEnd;
|
||||||
|
|
||||||
protected float laserRange = 6;
|
protected float laserRange = 6;
|
||||||
@ -211,7 +211,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
for(int i = 0; i < entity.power.links.size; i++){
|
for(int i = 0; i < entity.power.links.size; i++){
|
||||||
Tile link = world.tile(entity.power.links.get(i));
|
Tile link = world.tile(entity.power.links.get(i));
|
||||||
if(link != null && (link.pos() < tile.pos() || !(link.block() instanceof PowerNode) || !Core.camera.bounds(Tmp.r1).contains(link.drawx(), link.drawy()))){
|
if(linkValid(tile, link) && (link.pos() < tile.pos() || !(link.block() instanceof PowerNode) || !Core.camera.bounds(Tmp.r1).contains(link.drawx(), link.drawy()))){
|
||||||
drawLaser(tile, link);
|
drawLaser(tile, link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -248,13 +248,13 @@ public class PowerNode extends PowerBlock{
|
|||||||
x2 = target.drawx(), y2 = target.drawy();
|
x2 = target.drawx(), y2 = target.drawy();
|
||||||
|
|
||||||
float angle1 = Angles.angle(x1, y1, x2, y2);
|
float angle1 = Angles.angle(x1, y1, x2, y2);
|
||||||
|
|
||||||
t1.trns(angle1, tile.block().size * tilesize / 2f - 1.5f);
|
t1.trns(angle1, tile.block().size * tilesize / 2f - 1.5f);
|
||||||
|
t2.trns(angle1 + 180f, target.block().size * tilesize / 2f - 1.5f);
|
||||||
|
|
||||||
x1 += t1.x;
|
x1 += t1.x;
|
||||||
y1 += t1.y;
|
y1 += t1.y;
|
||||||
x2 -= t1.x;
|
x2 += t2.x;
|
||||||
y2 -= t1.y;
|
y2 += t2.y;
|
||||||
|
|
||||||
Draw.color(Pal.powerLight, Color.WHITE, Mathf.absin(Time.time(), 8f, 0.3f) + 0.2f);
|
Draw.color(Pal.powerLight, Color.WHITE, Mathf.absin(Time.time(), 8f, 0.3f) + 0.2f);
|
||||||
Shapes.laser(laser, laserEnd, x1, y1, x2, y2, 0.6f);
|
Shapes.laser(laser, laserEnd, x1, y1, x2, y2, 0.6f);
|
||||||
|
Reference in New Issue
Block a user