Fixed possible wave crash

This commit is contained in:
Anuken
2018-04-01 11:39:50 -04:00
parent 0936fc6550
commit 528cb6bf40

View File

@@ -172,7 +172,7 @@ public class Control extends Module{
Events.on(WaveEvent.class, () -> { Events.on(WaveEvent.class, () -> {
Sounds.play("spawn"); Sounds.play("spawn");
int last = Settings.getInt("hiscore" + world.getMap().name); int last = Settings.getInt("hiscore" + world.getMap().name, 0);
if(state.wave > last && !state.mode.infiniteResources && !state.mode.disableWaveTimer){ if(state.wave > last && !state.mode.infiniteResources && !state.mode.disableWaveTimer){
Settings.putInt("hiscore" + world.getMap().name, state.wave); Settings.putInt("hiscore" + world.getMap().name, state.wave);