Fixed precedence issue

This commit is contained in:
Dylan K. Taylor 2017-03-06 11:40:28 +00:00
parent d6d3184e37
commit f204422432

View File

@ -430,7 +430,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
public function setViewDistance(int $distance){
$this->viewDistance = $this->server->getAllowedViewDistance($distance);
$this->spawnThreshold = (int) min($this->viewDistance, $this->server->getProperty("chunk-sending.spawn-radius")) ** 2 * M_PI;
$this->spawnThreshold = (int) (min($this->viewDistance, $this->server->getProperty("chunk-sending.spawn-radius")) ** 2 * M_PI);
$pk = new ChunkRadiusUpdatedPacket();
$pk->radius = $this->viewDistance;