summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-04-13 03:13:36 -0400
committerEvilSeph <evilseph@unaligned.org>2011-04-13 03:13:36 -0400
commitf34f41a471715395a30e113c740eac239247e8be (patch)
tree71a013e935c1ca6d4fa574de357cb1a6a1441eea
parent70eb283bd085f82ef9f40b0db7bca6cdeb6942c7 (diff)
downloadcraftbukkit-f34f41a471715395a30e113c740eac239247e8be.tar
craftbukkit-f34f41a471715395a30e113c740eac239247e8be.tar.gz
craftbukkit-f34f41a471715395a30e113c740eac239247e8be.tar.lz
craftbukkit-f34f41a471715395a30e113c740eac239247e8be.tar.xz
craftbukkit-f34f41a471715395a30e113c740eac239247e8be.zip
Fixed the NaN check in Entity.java
-rw-r--r--src/main/java/net/minecraft/server/Entity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index a4e972ec..22f344fc 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -146,7 +146,7 @@ public abstract class Entity {
protected void c(float f, float f1) {
// Craftbukkit start
- if ((f == Float.POSITIVE_INFINITY) || (f == Float.NEGATIVE_INFINITY) || (f == Float.NaN)) {
+ if ((f == Float.POSITIVE_INFINITY) || (f == Float.NEGATIVE_INFINITY) || (Float.isNaN(f))) {
if (this instanceof EntityPlayer) {
System.err.println(getBukkitEntity() + " was caught trying to crash the server with an invalid yaw");
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");
@@ -154,7 +154,7 @@ public abstract class Entity {
f = 0;
}
- if ((f1 == Float.POSITIVE_INFINITY) || (f1 == Float.NEGATIVE_INFINITY) || (f1 == Float.NaN)) {
+ if ((f1 == Float.POSITIVE_INFINITY) || (f1 == Float.NEGATIVE_INFINITY) || (Float.isNaN(f1))) {
if (this instanceof EntityPlayer) {
System.err.println(getBukkitEntity() + " was caught trying to crash the server with an invalid pitch");
((CraftPlayer)this.getBukkitEntity()).kickPlayer("Nope");