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.IOException;
|
||||
|
||||
import static io.anuke.mindustry.Vars.headless;
|
||||
import static io.anuke.mindustry.Vars.players;
|
||||
|
||||
public class AlphaDrone extends FlyingUnit {
|
||||
static final float followDistance = 80f;
|
||||
|
||||
@@ -82,8 +85,8 @@ public class AlphaDrone extends FlyingUnit {
|
||||
public void readSave(DataInput stream) throws IOException{
|
||||
super.readSave(stream);
|
||||
|
||||
if(!Net.active()){
|
||||
leader = Vars.players[0];
|
||||
if(!Net.active() && !headless){
|
||||
leader = players[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public enum GameMode{
|
||||
noWaves{{
|
||||
disableWaves = true;
|
||||
hidden = true;
|
||||
autoSpawn = true;
|
||||
enemyCheat = true;
|
||||
showPads = true;
|
||||
}},
|
||||
pvp{{
|
||||
@@ -26,7 +26,7 @@ public enum GameMode{
|
||||
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 enemyCoreShieldRadius = 140f;
|
||||
public float respawnTime = 60 * 4;
|
||||
|
||||
@@ -261,7 +261,7 @@ public class Tile implements PosTrait, TargetTrait{
|
||||
}
|
||||
|
||||
public boolean isEnemyCheat(){
|
||||
return getTeam() == waveTeam && state.mode.autoSpawn;
|
||||
return getTeam() == waveTeam && state.mode.enemyCheat;
|
||||
}
|
||||
|
||||
public boolean isLinked(){
|
||||
|
||||
Reference in New Issue
Block a user