Archiviert
13
0

Fixes the whitescreen issue some people were having.

Dieser Commit ist enthalten in:
EvilSeph 2011-04-24 20:14:33 -04:00
Ursprung d156fcf9c8
Commit 0740e0c777
2 geänderte Dateien mit 21 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -852,6 +852,18 @@ public abstract class Entity {
public void d(NBTTagCompound nbttagcompound) { public void d(NBTTagCompound nbttagcompound) {
nbttagcompound.a("Pos", (NBTBase) this.a(new double[] { this.locX, this.locY, this.locZ})); nbttagcompound.a("Pos", (NBTBase) this.a(new double[] { this.locX, this.locY, this.locZ}));
nbttagcompound.a("Motion", (NBTBase) this.a(new double[] { this.motX, this.motY, this.motZ})); nbttagcompound.a("Motion", (NBTBase) this.a(new double[] { this.motX, this.motY, this.motZ}));
// CraftBukkit start - checking for NaN pitch/yaw and resetting to zero
// TODO: make sure this is the best way to address this.
if (Float.isNaN(this.yaw)) {
this.yaw = 0;
}
if (Float.isNaN(this.pitch)) {
this.pitch = 0;
}
// CraftBukkit end
nbttagcompound.a("Rotation", (NBTBase) this.a(new float[] { this.yaw, this.pitch})); nbttagcompound.a("Rotation", (NBTBase) this.a(new float[] { this.yaw, this.pitch}));
nbttagcompound.a("FallDistance", this.fallDistance); nbttagcompound.a("FallDistance", this.fallDistance);
nbttagcompound.a("Fire", (short) this.fireTicks); nbttagcompound.a("Fire", (short) this.fireTicks);

Datei anzeigen

@ -356,6 +356,15 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
d2 = to.getZ(); d2 = to.getZ();
f = to.getYaw(); f = to.getYaw();
f1 = to.getPitch(); f1 = to.getPitch();
// TODO: make sure this is the best way to address this.
if (Float.isNaN(f)) {
f = 0;
}
if (Float.isNaN(f1)) {
f1 = 0;
}
// CraftBukkit end // CraftBukkit end
this.m = false; this.m = false;