mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Fixed #1255
This commit is contained in:
@@ -1251,6 +1251,12 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$tickDiff = $currentTick - $this->lastUpdate;
|
||||||
|
if($tickDiff <= 0){
|
||||||
|
$this->server->getLogger()->debug("Expected tick difference of at least 1, got $tickDiff for " . get_class($this));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$this->isAlive()){
|
if(!$this->isAlive()){
|
||||||
$this->deadTicks += $tickDiff;
|
$this->deadTicks += $tickDiff;
|
||||||
if($this->deadTicks >= 10){
|
if($this->deadTicks >= 10){
|
||||||
@@ -1262,12 +1268,6 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
return $this->deadTicks < 10;
|
return $this->deadTicks < 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tickDiff = $currentTick - $this->lastUpdate;
|
|
||||||
if($tickDiff <= 0){
|
|
||||||
$this->server->getLogger()->debug("Expected tick difference of at least 1, got $tickDiff for " . get_class($this));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->lastUpdate = $currentTick;
|
$this->lastUpdate = $currentTick;
|
||||||
|
|
||||||
$this->timings->startTiming();
|
$this->timings->startTiming();
|
||||||
|
Reference in New Issue
Block a user