12
1

Merge pull request 'Fix replay locations' (#320) from fixReplaySound into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #320
Reviewed-by: Chaoscaot <chaoscaot444@gmail.com>
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Lixfel 2022-01-01 12:09:15 +01:00
Commit 57dc780832
2 geänderte Dateien mit 12 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -54,6 +54,7 @@ import java.util.logging.Level;
public class PacketProcessor {
static boolean replaying = false;
public static boolean isReplaying(){
@ -201,7 +202,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 +341,14 @@ 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 rawZ = source.readInt() - arenaMinZ;
if(rotateZ)
rawZ = Config.ArenaRegion.getSizeZ() - rawZ;
int z = rawZ + Config.ArenaRegion.getMinZ();
String soundName = source.readUTF();
String soundCategory = source.readUTF();

Datei anzeigen

@ -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);
}