From 0cb8f28122f812f9b1cf3d6d56f0a8a1bb80f21a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 25 Dec 2012 13:41:01 +0100 Subject: [PATCH] Fix for torches --- classes/Player.class.php | 2 +- classes/SuperflatGenerator.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Player.class.php b/classes/Player.class.php index 045dd3a64..6c056dd25 100644 --- a/classes/Player.class.php +++ b/classes/Player.class.php @@ -297,7 +297,7 @@ class Player{ break; case MC_REQUEST_CHUNK: $this->actionQueue(' - $max = max(1, floor(($this->MTU - 16 - 255) / 192) - 1); + $max = max(1, floor(($this->MTU - 16 - 255) / 192)); $chunk = $this->server->api->level->getOrderedChunk('.$data["x"].', '.$data["z"].', $max); foreach($chunk as $d){ $this->dataPacket(MC_CHUNK_DATA, array( diff --git a/classes/SuperflatGenerator.class.php b/classes/SuperflatGenerator.class.php index 193303ef6..6daf589f7 100644 --- a/classes/SuperflatGenerator.class.php +++ b/classes/SuperflatGenerator.class.php @@ -94,7 +94,7 @@ class SuperflatGenerator{ if(floor(sqrt(pow($x - $this->spawn[0], 2) + pow($z - $this->spawn[2], 2))) <= $this->config["spawn-radius"]){ $column[0]{strlen($column[0])-1} = chr($this->config["spawn-surface"]); } - if(($x % 8) === 0 and ($z % 8) === 0 and $this->config["torches"] === 1){ + if(($x % 8) === 0 and ($z % 8) === 0 and $this->config["torches"] == "1"){ $column[0] .= chr(50); } $column[0] .= str_repeat(chr(0), 128 - strlen($column[0]));