Minor tweaks
This commit is contained in:
@@ -2486,7 +2486,7 @@ public class UnitTypes{
|
|||||||
heatColor = Color.valueOf("f9350f");
|
heatColor = Color.valueOf("f9350f");
|
||||||
cooldownTime = 80f;
|
cooldownTime = 80f;
|
||||||
|
|
||||||
bullet = new BasicBulletType(8f, 140){{
|
bullet = new BasicBulletType(8f, 130){{
|
||||||
sprite = "missile-large";
|
sprite = "missile-large";
|
||||||
width = 9.5f;
|
width = 9.5f;
|
||||||
height = 15f;
|
height = 15f;
|
||||||
@@ -2502,6 +2502,8 @@ public class UnitTypes{
|
|||||||
trailWidth = 3.1f;
|
trailWidth = 3.1f;
|
||||||
trailLength = 8;
|
trailLength = 8;
|
||||||
hitEffect = despawnEffect = Fx.blastExplosion;
|
hitEffect = despawnEffect = Fx.blastExplosion;
|
||||||
|
splashDamageRadius = 20f;
|
||||||
|
splashDamage = 50f;
|
||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
public class FogControl implements CustomChunk{
|
public class FogControl implements CustomChunk{
|
||||||
private static volatile int ww, wh;
|
private static volatile int ww, wh;
|
||||||
private static final int buildLight = 1;
|
private static final int buildLight = 0;
|
||||||
|
|
||||||
private final Object sync = new Object();
|
private final Object sync = new Object();
|
||||||
/** indexed by [team] [packed array tile pos] */
|
/** indexed by [team] [packed array tile pos] */
|
||||||
@@ -42,7 +42,7 @@ public class FogControl implements CustomChunk{
|
|||||||
if(state.rules.fog && read){
|
if(state.rules.fog && read){
|
||||||
for(var build : Groups.build){
|
for(var build : Groups.build){
|
||||||
synchronized(events){
|
synchronized(events){
|
||||||
events.add(FogEvent.get(build.tile.x, build.tile.y, buildLight, build.team.id));
|
events.add(FogEvent.get(build.tile.x, build.tile.y, buildLight + build.block.size, build.team.id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import arc.util.*;
|
|||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
/** Highly experimental fog-of-war renderer. */
|
/** Highly experimental fog-of-war renderer. */
|
||||||
public class FogRenderer{
|
public class FogRenderer{
|
||||||
private static final float fogSpeed = 1f;
|
|
||||||
private FrameBuffer buffer = new FrameBuffer();
|
private FrameBuffer buffer = new FrameBuffer();
|
||||||
private LongSeq events = new LongSeq();
|
private LongSeq events = new LongSeq();
|
||||||
private Rect rect = new Rect();
|
private Rect rect = new Rect();
|
||||||
@@ -27,9 +27,6 @@ public class FogRenderer{
|
|||||||
lastTeam = null;
|
lastTeam = null;
|
||||||
events.clear();
|
events.clear();
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO draw fog when tile is placed?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleEvent(long event){
|
public void handleEvent(long event){
|
||||||
@@ -72,7 +69,13 @@ public class FogRenderer{
|
|||||||
//process new fog events
|
//process new fog events
|
||||||
for(int i = 0; i < events.size; i++){
|
for(int i = 0; i < events.size; i++){
|
||||||
long e = events.items[i];
|
long e = events.items[i];
|
||||||
Fill.poly(FogEvent.x(e) + 0.5f, FogEvent.y(e) + 0.5f, 20, FogEvent.radius(e) + 0.3f);
|
Tile tile = world.tile(FogEvent.x(e), FogEvent.y(e));
|
||||||
|
float o = 0f;
|
||||||
|
//visual offset for uneven blocks; this is not reflected on the CPU, but it doesn't really matter
|
||||||
|
if(tile != null && tile.block().size % 2 == 0 && tile.isCenter()){
|
||||||
|
o = 0.5f;
|
||||||
|
}
|
||||||
|
Fill.poly(FogEvent.x(e) + 0.5f + o, FogEvent.y(e) + 0.5f + o, 20, FogEvent.radius(e) + 0.3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
events.clear();
|
events.clear();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class UnitCargoLoader extends Block{
|
|||||||
super.drawPlace(x, y, rotation, valid);
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
if(!Units.canCreate(Vars.player.team(), unitType)){
|
if(!Units.canCreate(Vars.player.team(), unitType)){
|
||||||
drawPlaceText(Core.bundle.get("@bar.cargounitcap"), x, y, valid);
|
drawPlaceText(Core.bundle.get("bar.cargounitcap"), x, y, valid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user