Fixes
This commit is contained in:
@@ -16,5 +16,5 @@ const boolp = method => new Boolp(){get: method}
|
|||||||
const cons = method => new Cons(){get: method}
|
const cons = method => new Cons(){get: method}
|
||||||
const prov = method => new Prov(){get: method}
|
const prov = method => new Prov(){get: method}
|
||||||
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
||||||
Call = Packages.io.anuke.mindustry.gen.Call
|
Call = Packages.mindustry.gen.Call
|
||||||
const Calls = Call //backwards compat
|
const Calls = Call //backwards compat
|
||||||
@@ -18,7 +18,7 @@ const boolp = method => new Boolp(){get: method}
|
|||||||
const cons = method => new Cons(){get: method}
|
const cons = method => new Cons(){get: method}
|
||||||
const prov = method => new Prov(){get: method}
|
const prov = method => new Prov(){get: method}
|
||||||
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
||||||
Call = Packages.io.anuke.mindustry.gen.Call
|
Call = Packages.mindustry.gen.Call
|
||||||
const Calls = Call //backwards compat
|
const Calls = Call //backwards compat
|
||||||
importPackage(Packages.arc)
|
importPackage(Packages.arc)
|
||||||
importPackage(Packages.arc.func)
|
importPackage(Packages.arc.func)
|
||||||
|
|||||||
@@ -307,10 +307,9 @@ public class Mechs implements ContentList{
|
|||||||
super.updateAlt(player);
|
super.updateAlt(player);
|
||||||
|
|
||||||
if(player.timer.get(Player.timerAbility, effectReload)){
|
if(player.timer.get(Player.timerAbility, effectReload)){
|
||||||
//wasHealed = false;
|
|
||||||
|
|
||||||
Units.nearby(player.getTeam(), player.x, player.y, effectRange, unit -> {
|
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 -> {
|
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);
|
Effects.effect(Fx.healBlockFull, Pal.heal, other.drawx(), other.drawy(), other.block().size);
|
||||||
});
|
});
|
||||||
|
|
||||||
//if(wasHealed){
|
|
||||||
Effects.effect(Fx.overdriveWave, player);
|
Effects.effect(Fx.overdriveWave, player);
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
netClient.byteStream.setBytes(net.decompressSnapshot(coreData, coreDataLen));
|
netClient.byteStream.setBytes(net.decompressSnapshot(coreData, coreDataLen));
|
||||||
DataInputStream input = netClient.dataStream;
|
DataInputStream input = netClient.dataStream;
|
||||||
|
|
||||||
byte cores = input.readByte();
|
int cores = input.readInt();
|
||||||
for(int i = 0; i < cores; i++){
|
for(int i = 0; i < cores; i++){
|
||||||
int pos = input.readInt();
|
int pos = input.readInt();
|
||||||
Tile tile = world.tile(pos);
|
Tile tile = world.tile(pos);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package mindustry.core;
|
package mindustry.core;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
|
||||||
import arc.struct.*;
|
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.CommandHandler.*;
|
import arc.util.CommandHandler.*;
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.core.GameState.*;
|
import mindustry.core.GameState.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
@@ -295,9 +295,11 @@ public class NetServer implements ApplicationListener{
|
|||||||
void vote(Player player, int d){
|
void vote(Player player, int d){
|
||||||
votes += d;
|
votes += d;
|
||||||
voted.addAll(player.uuid, admins.getInfo(player.uuid).lastIP);
|
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.",
|
if(!checkPass()){
|
||||||
player.name, target.name, votes, votesRequired()));
|
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(){
|
boolean checkPass(){
|
||||||
@@ -654,7 +656,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
syncStream.reset();
|
syncStream.reset();
|
||||||
Array<CoreEntity> cores = state.teams.cores(player.getTeam());
|
Array<CoreEntity> cores = state.teams.cores(player.getTeam());
|
||||||
|
|
||||||
dataStream.writeByte(cores.size);
|
dataStream.writeInt(cores.size);
|
||||||
|
|
||||||
for(CoreEntity entity : cores){
|
for(CoreEntity entity : cores){
|
||||||
dataStream.writeInt(entity.tile.pos());
|
dataStream.writeInt(entity.tile.pos());
|
||||||
|
|||||||
@@ -166,33 +166,42 @@ public enum EditorTool{
|
|||||||
stack.clear();
|
stack.clear();
|
||||||
stack.add(Pos.get(x, y));
|
stack.add(Pos.get(x, y));
|
||||||
|
|
||||||
while(stack.size > 0){
|
try{
|
||||||
int popped = stack.pop();
|
while(stack.size > 0 && stack.size < width*height){
|
||||||
x = Pos.x(popped);
|
int popped = stack.pop();
|
||||||
y = Pos.y(popped);
|
x = Pos.x(popped);
|
||||||
|
y = Pos.y(popped);
|
||||||
|
|
||||||
x1 = x;
|
x1 = x;
|
||||||
while(x1 >= 0 && tester.get(editor.tile(x1, y))) x1--;
|
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++;
|
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.color(baseColor, phaseColor, entity.phaseHeat);
|
||||||
Draw.alpha(entity.heat * Mathf.absin(Time.time(), 10f, 1f) * 0.5f);
|
Draw.alpha(entity.heat * Mathf.absin(Time.time(), 10f, 1f) * 0.5f);
|
||||||
//Draw.blend(Blending.additive);
|
|
||||||
Draw.rect(topRegion, tile.drawx(), tile.drawy());
|
Draw.rect(topRegion, tile.drawx(), tile.drawy());
|
||||||
//Draw.blend();
|
|
||||||
|
|
||||||
Draw.alpha(1f);
|
Draw.alpha(1f);
|
||||||
Lines.stroke((2f * f + 0.2f) * entity.heat);
|
Lines.stroke((2f * f + 0.2f) * entity.heat);
|
||||||
|
|||||||
Reference in New Issue
Block a user