Fixes
This commit is contained in:
@@ -307,10 +307,9 @@ public class Mechs implements ContentList{
|
||||
super.updateAlt(player);
|
||||
|
||||
if(player.timer.get(Player.timerAbility, effectReload)){
|
||||
//wasHealed = false;
|
||||
|
||||
Units.nearby(player.getTeam(), player.x, player.y, effectRange, unit -> {
|
||||
unit.applyEffect(StatusEffects.overdrive, effectDuration);
|
||||
//unit.applyEffect(StatusEffects.overdrive, effectDuration);
|
||||
});
|
||||
|
||||
indexer.eachBlock(player, effectRange, other -> other.entity.damaged(), other -> {
|
||||
@@ -318,9 +317,7 @@ public class Mechs implements ContentList{
|
||||
Effects.effect(Fx.healBlockFull, Pal.heal, other.drawx(), other.drawy(), other.block().size);
|
||||
});
|
||||
|
||||
//if(wasHealed){
|
||||
Effects.effect(Fx.overdriveWave, player);
|
||||
//}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -385,7 +385,7 @@ public class NetClient implements ApplicationListener{
|
||||
netClient.byteStream.setBytes(net.decompressSnapshot(coreData, coreDataLen));
|
||||
DataInputStream input = netClient.dataStream;
|
||||
|
||||
byte cores = input.readByte();
|
||||
int cores = input.readInt();
|
||||
for(int i = 0; i < cores; i++){
|
||||
int pos = input.readInt();
|
||||
Tile tile = world.tile(pos);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package mindustry.core;
|
||||
|
||||
import arc.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import arc.struct.*;
|
||||
import arc.graphics.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.CommandHandler.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.entities.*;
|
||||
@@ -295,9 +295,11 @@ public class NetServer implements ApplicationListener{
|
||||
void vote(Player player, int d){
|
||||
votes += d;
|
||||
voted.addAll(player.uuid, admins.getInfo(player.uuid).lastIP);
|
||||
|
||||
Call.sendMessage(Strings.format("[orange]{0}[lightgray] has voted to kick[orange] {1}[].[accent] ({2}/{3})\n[lightgray]Type[orange] /vote <y/n>[] to agree.",
|
||||
player.name, target.name, votes, votesRequired()));
|
||||
|
||||
if(!checkPass()){
|
||||
Call.sendMessage(Strings.format("[orange]{0}[lightgray] has voted to kick[orange] {1}[].[accent] ({2}/{3})\n[lightgray]Type[orange] /vote <y/n>[] to agree.",
|
||||
player.name, target.name, votes, votesRequired()));
|
||||
}
|
||||
}
|
||||
|
||||
boolean checkPass(){
|
||||
@@ -654,7 +656,7 @@ public class NetServer implements ApplicationListener{
|
||||
syncStream.reset();
|
||||
Array<CoreEntity> cores = state.teams.cores(player.getTeam());
|
||||
|
||||
dataStream.writeByte(cores.size);
|
||||
dataStream.writeInt(cores.size);
|
||||
|
||||
for(CoreEntity entity : cores){
|
||||
dataStream.writeInt(entity.tile.pos());
|
||||
|
||||
@@ -166,33 +166,42 @@ public enum EditorTool{
|
||||
stack.clear();
|
||||
stack.add(Pos.get(x, y));
|
||||
|
||||
while(stack.size > 0){
|
||||
int popped = stack.pop();
|
||||
x = Pos.x(popped);
|
||||
y = Pos.y(popped);
|
||||
try{
|
||||
while(stack.size > 0 && stack.size < width*height){
|
||||
int popped = stack.pop();
|
||||
x = Pos.x(popped);
|
||||
y = Pos.y(popped);
|
||||
|
||||
x1 = x;
|
||||
while(x1 >= 0 && tester.get(editor.tile(x1, y))) x1--;
|
||||
x1++;
|
||||
boolean spanAbove = false, spanBelow = false;
|
||||
while(x1 < width && tester.get(editor.tile(x1, y))){
|
||||
filler.get(editor.tile(x1, y));
|
||||
|
||||
if(!spanAbove && y > 0 && tester.get(editor.tile(x1, y - 1))){
|
||||
stack.add(Pos.get(x1, y - 1));
|
||||
spanAbove = true;
|
||||
}else if(spanAbove && !tester.get(editor.tile(x1, y - 1))){
|
||||
spanAbove = false;
|
||||
}
|
||||
|
||||
if(!spanBelow && y < height - 1 && tester.get(editor.tile(x1, y + 1))){
|
||||
stack.add(Pos.get(x1, y + 1));
|
||||
spanBelow = true;
|
||||
}else if(spanBelow && y < height - 1 && !tester.get(editor.tile(x1, y + 1))){
|
||||
spanBelow = false;
|
||||
}
|
||||
x1 = x;
|
||||
while(x1 >= 0 && tester.get(editor.tile(x1, y))) x1--;
|
||||
x1++;
|
||||
boolean spanAbove = false, spanBelow = false;
|
||||
while(x1 < width && tester.get(editor.tile(x1, y))){
|
||||
filler.get(editor.tile(x1, y));
|
||||
|
||||
if(!spanAbove && y > 0 && tester.get(editor.tile(x1, y - 1))){
|
||||
stack.add(Pos.get(x1, y - 1));
|
||||
spanAbove = true;
|
||||
}else if(spanAbove && !tester.get(editor.tile(x1, y - 1))){
|
||||
spanAbove = false;
|
||||
}
|
||||
|
||||
if(!spanBelow && y < height - 1 && tester.get(editor.tile(x1, y + 1))){
|
||||
stack.add(Pos.get(x1, y + 1));
|
||||
spanBelow = true;
|
||||
}else if(spanBelow && y < height - 1 && !tester.get(editor.tile(x1, y + 1))){
|
||||
spanBelow = false;
|
||||
}
|
||||
x1++;
|
||||
}
|
||||
}
|
||||
stack.clear();
|
||||
}catch(OutOfMemoryError e){
|
||||
//hack
|
||||
stack = null;
|
||||
System.gc();
|
||||
e.printStackTrace();
|
||||
stack = new IntArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +107,7 @@ public class MendProjector extends Block{
|
||||
|
||||
Draw.color(baseColor, phaseColor, entity.phaseHeat);
|
||||
Draw.alpha(entity.heat * Mathf.absin(Time.time(), 10f, 1f) * 0.5f);
|
||||
//Draw.blend(Blending.additive);
|
||||
Draw.rect(topRegion, tile.drawx(), tile.drawy());
|
||||
//Draw.blend();
|
||||
|
||||
Draw.alpha(1f);
|
||||
Lines.stroke((2f * f + 0.2f) * entity.heat);
|
||||
|
||||
Reference in New Issue
Block a user