diff --git a/src/Player.php b/src/Player.php index 89b3a716..4ad26a57 100755 --- a/src/Player.php +++ b/src/Player.php @@ -2432,6 +2432,19 @@ class Player{ break; } + if(is_infinite($packet->yaw) || is_infinite($packet->pitch) || is_infinite($packet->bodyYaw)){ + ConsoleAPI::warn("{$this->username} Attempted to crash other clients using INF rotation!"); + $this->close("invalid rotation"); + break; + } + + //doesnt crash anything but allows players to break their model rendering(make them/head invisible) + if(is_nan($packet->yaw) || is_nan($packet->pitch) || is_nan($packet->bodyYaw)){ + ConsoleAPI::warn("{$this->username} Attempted to break their model using NAN rotation!"); + $this->close("invalid rotation"); + break; + } + if(($this->entity instanceof Entity) && $packet->messageIndex > $this->lastMovement){ $this->lastMovement = $packet->messageIndex; //prevent all movement this far - vanilla collisions break there