Do not set Level to null, closes #2032

This commit is contained in:
Shoghi Cervantes 2014-09-01 11:29:44 +02:00
parent 3eac08f5ba
commit c5626bae34
4 changed files with 1 additions and 17 deletions

View File

@ -228,7 +228,7 @@ class CrashDump{
$this->data["general"]["zend"] = zend_version();
$this->data["general"]["php_os"] = PHP_OS;
$this->data["general"]["os"] = Utils::getOS();
$this->addLine("PocketMine-MP version: " . $version->get(false) . " #" . $version->getNumber() . " [Protocol " . Info::CURRENT_PROTOCOL . "; API " . API_VERSION . "]");
$this->addLine("PocketMine-MP version: " . $version->get(false) . " #" . $version->getBuild() . " [Protocol " . Info::CURRENT_PROTOCOL . "; API " . API_VERSION . "]");
$this->addLine("Git commit: " . GIT_COMMIT);
$this->addLine("uname -a: " . php_uname("a"));
$this->addLine("PHP Version: " . phpversion());

View File

@ -1344,20 +1344,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->server->getLogger()->warning($this->getName()." moved too quickly!");
$revert = true;
}else{
/*if(($this->onGround and $dy != 0) or (!$this->onGround and $dy <= 0)){
if(count($this->getLevel()->getCollisionBlocks($this->boundingBox->getOffsetBoundingBox(0, $dy - 0.1, 0))) > 0){
$isColliding = true;
}else{
$isColliding = false;
}
$this->onGround = ($dy <= 0 and $isColliding);
}
$this->updateFallState($dy, $this->onGround);*/
if($this->chunk === null or !$this->chunk->isGenerated()){
$chunk = $this->getLevel()->getChunkAt($newPos->x >> 4, $newPos->z >> 4);
if(!($chunk instanceof FullChunk) or !$chunk->isGenerated()){

View File

@ -1114,7 +1114,6 @@ abstract class Entity extends Position implements Metadatable{
$level->removeEntity($this);
}
$this->despawnFromAll();
$this->level = null;
}
}

View File

@ -118,7 +118,6 @@ abstract class Tile extends Position{
if(($level = $this->getLevel()) instanceof Level){
$level->removeTile($this);
}
$this->level = null;
}
}