From 6a13705970a64d6c9a6782d68cba94509158678c Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 7 Jun 2013 16:42:31 +0200 Subject: [PATCH] Fixed Level PMF --- src/Player.php | 2 +- src/pmf/Level.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index 6e55f22ec5..8205e694ed 100644 --- a/src/Player.php +++ b/src/Player.php @@ -847,7 +847,7 @@ class Player{ if($diff > 16 and $d["sendtime"] < $limit){ $this->directDataPacket($d["id"], $d, $d["pid"]); ++$this->packetStats[1]; - $this->lag[] = microtime(true) - $this->recovery[$count]["sendtime"]; + $this->lag[] = microtime(true) - $d["sendtime"]; unset($this->recovery[$count]); } } diff --git a/src/pmf/Level.php b/src/pmf/Level.php index 19df270ec2..13ab873264 100644 --- a/src/pmf/Level.php +++ b/src/pmf/Level.php @@ -303,7 +303,7 @@ class PMFLevel extends PMF{ $X = $x >> 4; $Z = $z >> 4; $Y = $y >> 4; - if($X >= 32 or $Z >= 32 or $Y >= $this->levelData["height"] or $y < 0){ + if($x < 0 or $z < 0 or $X >= $this->levelData["width"] or $Z >= $this->levelData["width"] or $Y >= $this->levelData["height"] or $y < 0){ return array(AIR, 0); } $index = $this->getIndex($X, $Z);