Fixed rare server crash

This commit is contained in:
Anuken
2018-02-10 22:41:37 -05:00
parent a496c8ae3e
commit ef4a7a8fea
2 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,8 @@ public class EnemyType {
enemy.hitTime -= Timers.delta();
}
if(enemy.lane >= world.getSpawns().size) enemy.lane = 0;
boolean waiting = world.getSpawns().get(enemy.lane).pathTiles == null || enemy.node <= 0;
move(enemy);

View File

@ -218,6 +218,8 @@ public class ServerControl extends Module {
try{
mode = ShuffleMode.valueOf(arg[0]);
Settings.putString("shufflemode", arg[0]);
Settings.save();
info("Shuffle mode set to '{0}'.", arg[0]);
}catch (Exception e){
err("Unknown shuffle mode '{0}'.", arg[0]);