Save load crash fix / Minor name refactor
This commit is contained in:
@@ -16,6 +16,9 @@ import java.io.DataInput;
|
|||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.headless;
|
||||||
|
import static io.anuke.mindustry.Vars.players;
|
||||||
|
|
||||||
public class AlphaDrone extends FlyingUnit {
|
public class AlphaDrone extends FlyingUnit {
|
||||||
static final float followDistance = 80f;
|
static final float followDistance = 80f;
|
||||||
|
|
||||||
@@ -82,8 +85,8 @@ public class AlphaDrone extends FlyingUnit {
|
|||||||
public void readSave(DataInput stream) throws IOException{
|
public void readSave(DataInput stream) throws IOException{
|
||||||
super.readSave(stream);
|
super.readSave(stream);
|
||||||
|
|
||||||
if(!Net.active()){
|
if(!Net.active() && !headless){
|
||||||
leader = Vars.players[0];
|
leader = players[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public enum GameMode{
|
|||||||
noWaves{{
|
noWaves{{
|
||||||
disableWaves = true;
|
disableWaves = true;
|
||||||
hidden = true;
|
hidden = true;
|
||||||
autoSpawn = true;
|
enemyCheat = true;
|
||||||
showPads = true;
|
showPads = true;
|
||||||
}},
|
}},
|
||||||
pvp{{
|
pvp{{
|
||||||
@@ -26,7 +26,7 @@ public enum GameMode{
|
|||||||
respawnTime = 60 * 10;
|
respawnTime = 60 * 10;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public boolean infiniteResources, disableWaveTimer, disableWaves, hidden, autoSpawn, isPvp, showPads;
|
public boolean infiniteResources, disableWaveTimer, disableWaves, hidden, enemyCheat, isPvp, showPads;
|
||||||
public float enemyCoreBuildRadius = 400f;
|
public float enemyCoreBuildRadius = 400f;
|
||||||
public float enemyCoreShieldRadius = 140f;
|
public float enemyCoreShieldRadius = 140f;
|
||||||
public float respawnTime = 60 * 4;
|
public float respawnTime = 60 * 4;
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ public class Tile implements PosTrait, TargetTrait{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnemyCheat(){
|
public boolean isEnemyCheat(){
|
||||||
return getTeam() == waveTeam && state.mode.autoSpawn;
|
return getTeam() == waveTeam && state.mode.enemyCheat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLinked(){
|
public boolean isLinked(){
|
||||||
|
|||||||
Reference in New Issue
Block a user