Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
604e6f8c47 | ||
|
|
4ac4f10ea0 | ||
|
|
4c07733857 | ||
|
|
7dc0f4dbc5 | ||
|
|
22f64fa2a5 | ||
|
|
5b0f1b5c03 | ||
|
|
c6e0292d03 | ||
|
|
17eee61a93 | ||
|
|
3817b159cf | ||
|
|
331cf2e269 | ||
|
|
96622848d9 | ||
|
|
bcdc8867e6 | ||
|
|
eaeb67b91f | ||
|
|
ebd444cc5f | ||
|
|
ff1ab9dd42 | ||
|
|
7e2c830f9c | ||
|
|
0cc2214951 | ||
|
|
47443d5ae7 | ||
|
|
cd2c605036 | ||
|
|
847e46d270 | ||
|
|
3d6cfcafd0 |
@@ -143,7 +143,8 @@ public class EntityIO{
|
|||||||
if(sl) cont("if(!islocal)");
|
if(sl) cont("if(!islocal)");
|
||||||
|
|
||||||
if(sf){
|
if(sf){
|
||||||
st(field.name + lastSuf + " = this." + field.name + targetSuf);
|
//TODO adding + targetSuf to the assignment fixes units being interpolated incorrectly during physics, but makes interpolation snap instead.
|
||||||
|
st(field.name + lastSuf + " = this." + field.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
io(field.type, "this." + (sf ? field.name + targetSuf : field.name) + " = ");
|
io(field.type, "this." + (sf ? field.name + targetSuf : field.name) + " = ");
|
||||||
|
|||||||
@@ -460,6 +460,7 @@ toolmode.drawteams = Teams zeichnen
|
|||||||
toolmode.drawteams.description = Zeichnet Teams statt Blöcke.
|
toolmode.drawteams.description = Zeichnet Teams statt Blöcke.
|
||||||
|
|
||||||
filters.empty = [lightgray]Keine Filter! Füge einen mit dem unteren Knopf hinzu.
|
filters.empty = [lightgray]Keine Filter! Füge einen mit dem unteren Knopf hinzu.
|
||||||
|
|
||||||
filter.distort = Verzerren
|
filter.distort = Verzerren
|
||||||
filter.noise = Rauschen
|
filter.noise = Rauschen
|
||||||
filter.enemyspawn = Gegnerischer Spawn Auswahl
|
filter.enemyspawn = Gegnerischer Spawn Auswahl
|
||||||
@@ -476,6 +477,7 @@ filter.clear = Löschen
|
|||||||
filter.option.ignore = Ignorieren
|
filter.option.ignore = Ignorieren
|
||||||
filter.scatter = Streuen
|
filter.scatter = Streuen
|
||||||
filter.terrain = Landschaft
|
filter.terrain = Landschaft
|
||||||
|
|
||||||
filter.option.scale = Skalierung
|
filter.option.scale = Skalierung
|
||||||
filter.option.chance = Wahrscheinlichkeit
|
filter.option.chance = Wahrscheinlichkeit
|
||||||
filter.option.mag = Größe
|
filter.option.mag = Größe
|
||||||
@@ -490,6 +492,7 @@ filter.option.block = Block
|
|||||||
filter.option.floor = Boden
|
filter.option.floor = Boden
|
||||||
filter.option.flooronto = Zielboden
|
filter.option.flooronto = Zielboden
|
||||||
filter.option.target = Ziel
|
filter.option.target = Ziel
|
||||||
|
filter.option.replacement = Ersatz
|
||||||
filter.option.wall = Wand
|
filter.option.wall = Wand
|
||||||
filter.option.ore = Erz
|
filter.option.ore = Erz
|
||||||
filter.option.floor2 = Sekundärer Boden
|
filter.option.floor2 = Sekundärer Boden
|
||||||
@@ -675,6 +678,7 @@ unit.nobuild = [scarlet]Einheit kann nicht bauen!
|
|||||||
lastaccessed = [lightgray]Zuletzt konfiguriert: {0}
|
lastaccessed = [lightgray]Zuletzt konfiguriert: {0}
|
||||||
block.unknown = [lightgray]???
|
block.unknown = [lightgray]???
|
||||||
|
|
||||||
|
stat.showinmap = <öffne Spiel um zu zeigen>
|
||||||
stat.description = Beschreibung
|
stat.description = Beschreibung
|
||||||
stat.input = Eingang
|
stat.input = Eingang
|
||||||
stat.output = Ausgang
|
stat.output = Ausgang
|
||||||
@@ -991,6 +995,7 @@ rules.waves = Wellen
|
|||||||
rules.attack = Angriff-Modus
|
rules.attack = Angriff-Modus
|
||||||
rules.buildai = KI kann bauen
|
rules.buildai = KI kann bauen
|
||||||
rules.corecapture = Kern nach Zerstörung einnehmen
|
rules.corecapture = Kern nach Zerstörung einnehmen
|
||||||
|
rules.polygoncoreprotection = Polygonaler Kernschutz
|
||||||
rules.enemyCheat = Unbegrenzte Ressourcen für die KI (Rotes Team)
|
rules.enemyCheat = Unbegrenzte Ressourcen für die KI (Rotes Team)
|
||||||
rules.blockhealthmultiplier = Block-Lebenspunkte-Multiplikator
|
rules.blockhealthmultiplier = Block-Lebenspunkte-Multiplikator
|
||||||
rules.blockdamagemultiplier = Block-Schaden-Multiplikator
|
rules.blockdamagemultiplier = Block-Schaden-Multiplikator
|
||||||
@@ -1161,6 +1166,7 @@ block.spore-cluster.name = Sporen-Cluster
|
|||||||
block.metal-floor.name = Metallboden 1
|
block.metal-floor.name = Metallboden 1
|
||||||
block.metal-floor-2.name = Metallboden 2
|
block.metal-floor-2.name = Metallboden 2
|
||||||
block.metal-floor-3.name = Metallboden 3
|
block.metal-floor-3.name = Metallboden 3
|
||||||
|
block.metal-floor-4.name = Metallboden 4
|
||||||
block.metal-floor-5.name = Metallboden 5
|
block.metal-floor-5.name = Metallboden 5
|
||||||
block.metal-floor-damaged.name = beschädigter Metallboden
|
block.metal-floor-damaged.name = beschädigter Metallboden
|
||||||
block.dark-panel-1.name = Dunkles Panel 1
|
block.dark-panel-1.name = Dunkles Panel 1
|
||||||
@@ -1585,6 +1591,8 @@ lst.sensor = Gibt Daten über einen Block oder eine Einheit wieder.
|
|||||||
lst.set = Setzt eine Variable fest.
|
lst.set = Setzt eine Variable fest.
|
||||||
lst.operation = Verändert eine Variable.
|
lst.operation = Verändert eine Variable.
|
||||||
lst.end = Springt wieder nach oben.
|
lst.end = Springt wieder nach oben.
|
||||||
|
lst.wait = Wartet eine bestimmte Zeit.
|
||||||
|
lst.lookup = Sucht ein Item, eine Flüssigkeit, eine Einheit oder einen Block.\nGesamtmengen von jeder Sache können mit \n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[]\nabgerufen werden.
|
||||||
lst.jump = Falls die Bedingung erfüllt ist, wird woanders weitergemacht.
|
lst.jump = Falls die Bedingung erfüllt ist, wird woanders weitergemacht.
|
||||||
lst.unitbind = Speichert eine Einheit einer Sorte als [accent]@unit[].
|
lst.unitbind = Speichert eine Einheit einer Sorte als [accent]@unit[].
|
||||||
lst.unitcontrol = Steuert [accent]@unit[].
|
lst.unitcontrol = Steuert [accent]@unit[].
|
||||||
|
|||||||
Binary file not shown.
@@ -149,7 +149,16 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
|||||||
}
|
}
|
||||||
mods.eachClass(Mod::init);
|
mods.eachClass(Mod::init);
|
||||||
finished = true;
|
finished = true;
|
||||||
Events.fire(new ClientLoadEvent());
|
var event = new ClientLoadEvent();
|
||||||
|
//a temporary measure for compatibility with certain mods
|
||||||
|
Events.fireWrap(event.getClass(), event, listener -> {
|
||||||
|
try{
|
||||||
|
listener.get(event);
|
||||||
|
}catch(NoSuchFieldError | NoSuchMethodError | NoClassDefFoundError error){
|
||||||
|
Log.err(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
clientLoaded = true;
|
clientLoaded = true;
|
||||||
super.resize(graphics.getWidth(), graphics.getHeight());
|
super.resize(graphics.getWidth(), graphics.getHeight());
|
||||||
app.post(() -> app.post(() -> app.post(() -> app.post(() -> {
|
app.post(() -> app.post(() -> app.post(() -> app.post(() -> {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
@Override
|
@Override
|
||||||
public void begin(){
|
public void begin(){
|
||||||
if(physics == null) return;
|
if(physics == null) return;
|
||||||
|
boolean local = !Vars.net.client();
|
||||||
|
|
||||||
//remove stale entities
|
//remove stale entities
|
||||||
refs.removeAll(ref -> {
|
refs.removeAll(ref -> {
|
||||||
@@ -60,8 +61,9 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
ref.body.layer =
|
ref.body.layer =
|
||||||
entity.type.allowLegStep ? layerLegs :
|
entity.type.allowLegStep ? layerLegs :
|
||||||
entity.isGrounded() ? layerGround : layerFlying;
|
entity.isGrounded() ? layerGround : layerFlying;
|
||||||
ref.x = entity.x();
|
ref.x = entity.x;
|
||||||
ref.y = entity.y();
|
ref.y = entity.y;
|
||||||
|
ref.body.local = local || entity.isLocal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +158,10 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
|
|
||||||
for(int i = 0; i < bodies.size; i++){
|
for(int i = 0; i < bodies.size; i++){
|
||||||
PhysicsBody body = bodies.items[i];
|
PhysicsBody body = bodies.items[i];
|
||||||
|
|
||||||
|
//for clients, the only body that collides is the local one; all other physics simulations are handled by the server.
|
||||||
|
if(!body.local) continue;
|
||||||
|
|
||||||
body.hitbox(rect);
|
body.hitbox(rect);
|
||||||
|
|
||||||
seq.size = 0;
|
seq.size = 0;
|
||||||
@@ -174,10 +180,14 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
float ms = body.mass + other.mass;
|
float ms = body.mass + other.mass;
|
||||||
float m1 = other.mass / ms, m2 = body.mass / ms;
|
float m1 = other.mass / ms, m2 = body.mass / ms;
|
||||||
|
|
||||||
|
//first body is always local due to guard check above
|
||||||
body.x += vec.x * m1 / scl;
|
body.x += vec.x * m1 / scl;
|
||||||
body.y += vec.y * m1 / scl;
|
body.y += vec.y * m1 / scl;
|
||||||
other.x -= vec.x * m2 / scl;
|
|
||||||
other.y -= vec.y * m2 / scl;
|
if(other.local){
|
||||||
|
other.x -= vec.x * m2 / scl;
|
||||||
|
other.y -= vec.y * m2 / scl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
body.collided = true;
|
body.collided = true;
|
||||||
@@ -187,7 +197,7 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
public static class PhysicsBody implements QuadTreeObject{
|
public static class PhysicsBody implements QuadTreeObject{
|
||||||
public float x, y, radius, mass;
|
public float x, y, radius, mass;
|
||||||
public int layer = 0;
|
public int layer = 0;
|
||||||
public boolean collided = false;
|
public boolean collided = false, local = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hitbox(Rect out){
|
public void hitbox(Rect out){
|
||||||
|
|||||||
@@ -1589,13 +1589,13 @@ public class Blocks implements ContentList{
|
|||||||
shots = 4;
|
shots = 4;
|
||||||
burstSpacing = 5;
|
burstSpacing = 5;
|
||||||
inaccuracy = 10f;
|
inaccuracy = 10f;
|
||||||
range = 210f;
|
range = 215f;
|
||||||
xRand = 6f;
|
xRand = 6f;
|
||||||
size = 2;
|
size = 2;
|
||||||
health = 300 * size * size;
|
health = 300 * size * size;
|
||||||
shootSound = Sounds.missile;
|
shootSound = Sounds.missile;
|
||||||
|
|
||||||
limitRange(2f);
|
limitRange(5f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
salvo = new ItemTurret("salvo"){{
|
salvo = new ItemTurret("salvo"){{
|
||||||
|
|||||||
@@ -257,7 +257,6 @@ public class Bullets implements ContentList{
|
|||||||
width = 8f;
|
width = 8f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
|
||||||
splashDamageRadius = 30f;
|
splashDamageRadius = 30f;
|
||||||
splashDamage = 30f * 1.5f;
|
splashDamage = 30f * 1.5f;
|
||||||
ammoMultiplier = 5f;
|
ammoMultiplier = 5f;
|
||||||
@@ -274,7 +273,6 @@ public class Bullets implements ContentList{
|
|||||||
width = 7f;
|
width = 7f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
|
||||||
homingPower = 0.08f;
|
homingPower = 0.08f;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
splashDamage = 20f * 1.5f;
|
splashDamage = 20f * 1.5f;
|
||||||
@@ -288,7 +286,6 @@ public class Bullets implements ContentList{
|
|||||||
width = 8f;
|
width = 8f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
|
||||||
splashDamageRadius = 25f;
|
splashDamageRadius = 25f;
|
||||||
splashDamage = 25f * 1.4f;
|
splashDamage = 25f * 1.4f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
if(state.rules.pvp){
|
if(state.rules.pvp){
|
||||||
//find team with minimum amount of players and auto-assign player to that.
|
//find team with minimum amount of players and auto-assign player to that.
|
||||||
TeamData re = state.teams.getActive().min(data -> {
|
TeamData re = state.teams.getActive().min(data -> {
|
||||||
if((state.rules.waveTeam == data.team && state.rules.waves) || !data.team.active()) return Integer.MAX_VALUE;
|
if((state.rules.waveTeam == data.team && state.rules.waves) || !data.team.active() || data.team == Team.derelict) return Integer.MAX_VALUE;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for(Player other : players){
|
for(Player other : players){
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ public class BlockRenderer{
|
|||||||
|
|
||||||
darkEvents.each(pos -> {
|
darkEvents.each(pos -> {
|
||||||
var tile = world.tile(pos);
|
var tile = world.tile(pos);
|
||||||
|
if(tile == null) return;
|
||||||
float darkness = world.getDarkness(tile.x, tile.y);
|
float darkness = world.getDarkness(tile.x, tile.y);
|
||||||
//then draw the shadow
|
//then draw the shadow
|
||||||
Draw.colorl(darkness <= 0f ? 1f : 1f - Math.min((darkness + 0.5f) / 4f, 1f));
|
Draw.colorl(darkness <= 0f ? 1f : 1f - Math.min((darkness + 0.5f) / 4f, 1f));
|
||||||
|
|||||||
@@ -391,7 +391,15 @@ public class ArcNetProvider implements NetProvider{
|
|||||||
//no compression, copy over buffer
|
//no compression, copy over buffer
|
||||||
if(compression == 0){
|
if(compression == 0){
|
||||||
buffer.position(0).limit(length);
|
buffer.position(0).limit(length);
|
||||||
buffer.put(byteBuffer.array(), byteBuffer.position(), length);
|
if(byteBuffer.hasArray()){
|
||||||
|
buffer.put(byteBuffer.array(), byteBuffer.position(), length);
|
||||||
|
}else{
|
||||||
|
byte[] readcopy = new byte[length];
|
||||||
|
int pos = byteBuffer.position();
|
||||||
|
byteBuffer.get(readcopy);
|
||||||
|
byteBuffer.position(pos);
|
||||||
|
buffer.put(readcopy);
|
||||||
|
}
|
||||||
buffer.position(0);
|
buffer.position(0);
|
||||||
packet.read(reads.get(), length);
|
packet.read(reads.get(), length);
|
||||||
//move read packets forward
|
//move read packets forward
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class Net{
|
|||||||
|
|
||||||
if(e instanceof BufferUnderflowException || e instanceof BufferOverflowException){
|
if(e instanceof BufferUnderflowException || e instanceof BufferOverflowException){
|
||||||
error = Core.bundle.get("error.io");
|
error = Core.bundle.get("error.io");
|
||||||
}else if(error.equals("mismatch")){
|
}else if(error.equals("mismatch") || (e instanceof IndexOutOfBoundsException && e.getStackTrace()[0].getClassName().contains("java.nio"))){
|
||||||
error = Core.bundle.get("error.mismatch");
|
error = Core.bundle.get("error.mismatch");
|
||||||
}else if(error.contains("port out of range") || error.contains("invalid argument") || (error.contains("invalid") && error.contains("address")) || Strings.neatError(e).contains("address associated")){
|
}else if(error.contains("port out of range") || error.contains("invalid argument") || (error.contains("invalid") && error.contains("address")) || Strings.neatError(e).contains("address associated")){
|
||||||
error = Core.bundle.get("error.invalidaddress");
|
error = Core.bundle.get("error.invalidaddress");
|
||||||
|
|||||||
@@ -88,8 +88,12 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
net.handleException(t);
|
net.handleException(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch(SteamException e){
|
}catch(Exception e){
|
||||||
Log.err(e);
|
if(net.server()){
|
||||||
|
Log.err(e);
|
||||||
|
}else{
|
||||||
|
net.showError(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -303,7 +307,8 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
|
|||||||
try{
|
try{
|
||||||
SteamID lobby = smat.getLobbyByIndex(i);
|
SteamID lobby = smat.getLobbyByIndex(i);
|
||||||
String mode = smat.getLobbyData(lobby, "gamemode");
|
String mode = smat.getLobbyData(lobby, "gamemode");
|
||||||
if(mode == null || mode.isEmpty() || Strings.parseInt(smat.getLobbyData(lobby, "version"), -1) == -1) continue;
|
//make sure versions are equal, don't list incompatible lobbies
|
||||||
|
if(mode == null || mode.isEmpty() || (Version.build != -1 && Strings.parseInt(smat.getLobbyData(lobby, "version"), -1) != Version.build)) continue;
|
||||||
Host out = new Host(
|
Host out = new Host(
|
||||||
-1, //invalid ping
|
-1, //invalid ping
|
||||||
smat.getLobbyData(lobby, "name"),
|
smat.getLobbyData(lobby, "name"),
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
|
|||||||
kotlin.stdlib.default.dependency=false
|
kotlin.stdlib.default.dependency=false
|
||||||
#needed for android compilation
|
#needed for android compilation
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
archash=57b86e6bf0312aa8e8bc3b737c7d8f31fbe7a162
|
archash=2767f83cd523aa0f7f71e2c6d34950ad6eba60b0
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
{
|
{
|
||||||
"address": "be.mindustry.nydus.app:6567"
|
"address": "be.mindustry.nydus.app:6567"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"address": "157.90.180.53:25777"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"address": "mindustry.pl:7777"
|
"address": "mindustry.pl:7777"
|
||||||
},
|
},
|
||||||
@@ -12,6 +9,6 @@
|
|||||||
"address": "v7.mindurka.tk:9999"
|
"address": "v7.mindurka.tk:9999"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"address": "mindustry.me:7000"
|
"address": "c-n.ddns.net:6567"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"address": "mindustry.us.to"
|
"address": "mindustry.us.to"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mindustry.pl",
|
||||||
|
"address": ["mindustry.pl:6000", "mindustry.pl:6666", "mindustry.pl:6966"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[accent]Mindustry [red]Reborn",
|
||||||
|
"address": "mindustry.me:7000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Omega",
|
||||||
|
"address": "157.90.180.53:25777"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MeowLand",
|
||||||
|
"address": "34.134.111.15"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user