Made wave events fire on clients

This commit is contained in:
Anuken
2019-09-28 11:32:34 -04:00
parent b63de8b7d6
commit a9edee1550
2 changed files with 6 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ public class Logic implements ApplicationListener{
if(world.isZone()){
world.getZone().updateWave(state.wave);
}
for (Player p : playerGroup.all()) {
for(Player p : playerGroup.all()){
p.respawns = state.rules.respawns;
}
});

View File

@@ -329,6 +329,11 @@ public class NetClient implements ApplicationListener{
@Remote(variants = Variant.one, priority = PacketPriority.low, unreliable = true)
public static void onStateSnapshot(float waveTime, int wave, int enemies, short coreDataLen, byte[] coreData){
try{
if(wave > state.wave){
state.wave = wave;
Events.fire(new WaveEvent());
}
state.wavetime = waveTime;
state.wave = wave;
state.enemies = enemies;