mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
Fixed #1255
This commit is contained in:
parent
87c16dab23
commit
aa6eef26e9
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user