"grabage struct"
This commit is contained in:
@@ -38,8 +38,6 @@ public class Renderer implements ApplicationListener{
|
|||||||
public Renderer(){
|
public Renderer(){
|
||||||
camera = new Camera();
|
camera = new Camera();
|
||||||
Shaders.init();
|
Shaders.init();
|
||||||
|
|
||||||
//fx.addEffect(new SnowFilter());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shake(float intensity, float duration){
|
public void shake(float intensity, float duration){
|
||||||
|
|||||||
@@ -82,6 +82,9 @@ public abstract class BulletType extends Content{
|
|||||||
public int lightining;
|
public int lightining;
|
||||||
public int lightningLength = 5;
|
public int lightningLength = 5;
|
||||||
|
|
||||||
|
public float weaveScale = 1f;
|
||||||
|
public float weaveMag = -1f;
|
||||||
|
|
||||||
public float hitShake = 0f;
|
public float hitShake = 0f;
|
||||||
|
|
||||||
public BulletType(float speed, float damage){
|
public BulletType(float speed, float damage){
|
||||||
@@ -165,6 +168,10 @@ public abstract class BulletType extends Content{
|
|||||||
b.vel().setAngle(Mathf.slerpDelta(b.rotation(), b.angleTo(target), 0.08f));
|
b.vel().setAngle(Mathf.slerpDelta(b.rotation(), b.angleTo(target), 0.08f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(weaveMag > 0){
|
||||||
|
b.vel().rotate(Mathf.sin(Time.time() + b.id() * 3, weaveScale, weaveMag) * Time.delta());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,9 +10,6 @@ import mindustry.graphics.Pal;
|
|||||||
public class MissileBulletType extends BasicBulletType{
|
public class MissileBulletType extends BasicBulletType{
|
||||||
protected Color trailColor = Pal.missileYellowBack;
|
protected Color trailColor = Pal.missileYellowBack;
|
||||||
|
|
||||||
protected float weaveScale = 1f;
|
|
||||||
protected float weaveMag = -1f;
|
|
||||||
|
|
||||||
public MissileBulletType(float speed, float damage, String bulletSprite){
|
public MissileBulletType(float speed, float damage, String bulletSprite){
|
||||||
super(speed, damage, bulletSprite);
|
super(speed, damage, bulletSprite);
|
||||||
backColor = Pal.missileYellowBack;
|
backColor = Pal.missileYellowBack;
|
||||||
@@ -32,9 +29,5 @@ public class MissileBulletType extends BasicBulletType{
|
|||||||
if(Mathf.chance(Time.delta() * 0.2)){
|
if(Mathf.chance(Time.delta() * 0.2)){
|
||||||
Fx.missileTrail.at(b.x(), b.y(), 2f, trailColor);
|
Fx.missileTrail.at(b.x(), b.y(), 2f, trailColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(weaveMag > 0){
|
|
||||||
b.vel().rotate(Mathf.sin(Time.time() + b.id() * 3, weaveScale, weaveMag) * Time.delta());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class BuildBlock extends Block{
|
|||||||
public static void onConstructFinish(Tile tile, Block block, int builderID, byte rotation, Team team, boolean skipConfig){
|
public static void onConstructFinish(Tile tile, Block block, int builderID, byte rotation, Team team, boolean skipConfig){
|
||||||
if(tile == null) return;
|
if(tile == null) return;
|
||||||
float healthf = tile.entity.healthf();
|
float healthf = tile.entity.healthf();
|
||||||
tile.setBlock(block, team, (int)rotation);
|
tile.setBlock(block, team, rotation);
|
||||||
tile.entity.health(block.health * healthf);
|
tile.entity.health(block.health * healthf);
|
||||||
//last builder was this local client player, call placed()
|
//last builder was this local client player, call placed()
|
||||||
if(!headless && builderID == player.unit().id()){
|
if(!headless && builderID == player.unit().id()){
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class Incinerator extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTile(){
|
public void updateTile(){
|
||||||
if(consValid()){
|
if(consValid() && efficiency() > 0.9f){
|
||||||
heat = Mathf.lerpDelta(heat, 1f, 0.04f);
|
heat = Mathf.lerpDelta(heat, 1f, 0.04f);
|
||||||
}else{
|
}else{
|
||||||
heat = Mathf.lerpDelta(heat, 0f, 0.02f);
|
heat = Mathf.lerpDelta(heat, 0f, 0.02f);
|
||||||
|
|||||||
@@ -822,7 +822,7 @@ public class ServerControl implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
handler.register("gc", "Trigger a grabage struct. Testing only.", arg -> {
|
handler.register("gc", "Trigger a garbage collection. Testing only.", arg -> {
|
||||||
int pre = (int)(Core.app.getJavaHeap() / 1024 / 1024);
|
int pre = (int)(Core.app.getJavaHeap() / 1024 / 1024);
|
||||||
System.gc();
|
System.gc();
|
||||||
int post = (int)(Core.app.getJavaHeap() / 1024 / 1024);
|
int post = (int)(Core.app.getJavaHeap() / 1024 / 1024);
|
||||||
|
|||||||
Reference in New Issue
Block a user