diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java b/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java index 155605c..13638dd 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java @@ -201,7 +201,7 @@ public class PacketProcessor { z = Config.ArenaRegion.getSizeZ() - z; double locZ = z + Config.ArenaRegion.getMinZ(); float pitch = source.readFloat(); - float yaw = source.readFloat() + (rotateZ ? 360 : 0); + float yaw = source.readFloat() + (rotateZ ? 180 : 0); byte headYaw = (byte)((source.readByte() + (rotateZ ? 128 : 0)) % 256); execSync(() -> REntity.getEntity(entityId).move(locX, locY, locZ, pitch, yaw, headYaw)); @@ -340,9 +340,9 @@ public class PacketProcessor { } private void sound() throws IOException { - int x = source.readInt(); - int y = source.readInt(); - int z = source.readInt(); + int x = source.readInt() - arenaMinX + Config.ArenaRegion.getMinX(); + int y = source.readInt() - arenaMinY + Config.BluePasteRegion.getMinY(); + int z = source.readInt() - arenaMinZ + Config.ArenaRegion.getMinZ(); String soundName = source.readUTF(); String soundCategory = source.readUTF(); diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java index eba811d..2d300ab 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -122,11 +122,11 @@ public class FightStatistics { for (FightPlayer fp : Fight.getRedTeam().getPlayers()) savePlayerStats(fp, fightId); - setReplay(fightId, new FileInputStream(FileRecorder.getFile())); - if(ArenaMode.Event.contains(Config.mode)) { FightSystem.getEventFight().setFight(fightId); } + + setReplay(fightId, new FileInputStream(FileRecorder.getFile())); }catch(Exception e){ Bukkit.getLogger().log(Level.SEVERE, "Failed to save statistics", e); }