Fixed Level PMF

This commit is contained in:
Shoghi Cervantes 2013-06-07 16:42:31 +02:00
parent afbde5c7ac
commit 6a13705970
2 changed files with 2 additions and 2 deletions

View File

@ -847,7 +847,7 @@ class Player{
if($diff > 16 and $d["sendtime"] < $limit){ if($diff > 16 and $d["sendtime"] < $limit){
$this->directDataPacket($d["id"], $d, $d["pid"]); $this->directDataPacket($d["id"], $d, $d["pid"]);
++$this->packetStats[1]; ++$this->packetStats[1];
$this->lag[] = microtime(true) - $this->recovery[$count]["sendtime"]; $this->lag[] = microtime(true) - $d["sendtime"];
unset($this->recovery[$count]); unset($this->recovery[$count]);
} }
} }

View File

@ -303,7 +303,7 @@ class PMFLevel extends PMF{
$X = $x >> 4; $X = $x >> 4;
$Z = $z >> 4; $Z = $z >> 4;
$Y = $y >> 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); return array(AIR, 0);
} }
$index = $this->getIndex($X, $Z); $index = $this->getIndex($X, $Z);