mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 17:23:59 +07:00
Don't draw power beams for derelict blocks
This commit is contained in:
parent
52eab0b0c4
commit
8672dcf9f9
@ -144,7 +144,7 @@ public class ArcNetProvider implements NetProvider{
|
||||
|
||||
@Override
|
||||
public void received(Connection connection, Object object){
|
||||
if(!(connection.getArbitraryData() instanceof ArcConnection k) || !(object instanceof Packet pack)) return;
|
||||
if(!(connection.getArbitraryData() instanceof ArcConnection k)) return;
|
||||
|
||||
if(packetSpamLimit > 0 && !k.packetRate.allow(3000, packetSpamLimit)){
|
||||
Log.warn("Blacklisting IP '@' as potential DOS attack - packet spam.", k.address);
|
||||
@ -153,6 +153,8 @@ public class ArcNetProvider implements NetProvider{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(object instanceof Packet pack)) return;
|
||||
|
||||
Core.app.post(() -> {
|
||||
try{
|
||||
net.handleServerReceived(k, pack);
|
||||
|
@ -207,7 +207,7 @@ public class BeamNode extends PowerBlock{
|
||||
public void draw(){
|
||||
super.draw();
|
||||
|
||||
if(Mathf.zero(Renderer.laserOpacity)) return;
|
||||
if(Mathf.zero(Renderer.laserOpacity) || team == Team.derelict) return;
|
||||
|
||||
Draw.z(Layer.power);
|
||||
Draw.color(laserColor1, laserColor2, (1f - power.graph.getSatisfaction()) * 0.86f + Mathf.absin(3f, 0.1f));
|
||||
|
@ -472,7 +472,7 @@ public class PowerNode extends PowerBlock{
|
||||
public void draw(){
|
||||
super.draw();
|
||||
|
||||
if(Mathf.zero(Renderer.laserOpacity) || isPayload()) return;
|
||||
if(Mathf.zero(Renderer.laserOpacity) || isPayload() || team == Team.derelict) return;
|
||||
|
||||
Draw.z(Layer.power);
|
||||
setupColor(power.graph.getSatisfaction());
|
||||
|
Loading…
Reference in New Issue
Block a user