mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
fixed players need to move to pick up dropped items, close #498
This commit is contained in:
parent
f75cc93160
commit
874afc2fd2
@ -1570,10 +1570,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->isSpectator()){
|
||||
$this->checkNearEntities($tickDiff);
|
||||
}
|
||||
|
||||
$this->speed = ($to->subtract($from))->divide($tickDiff);
|
||||
}elseif($distanceSquared == 0){
|
||||
$this->speed = new Vector3(0, 0, 0);
|
||||
@ -1663,7 +1659,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$this->processMovement($tickDiff);
|
||||
$this->entityBaseTick($tickDiff);
|
||||
|
||||
if(!$this->isSpectator() and $this->speed !== null){
|
||||
if(!$this->isSpectator()){
|
||||
$this->checkNearEntities($tickDiff);
|
||||
|
||||
if($this->speed !== null){
|
||||
if($this->onGround){
|
||||
if($this->inAirTicks !== 0){
|
||||
$this->startAirTicks = 5;
|
||||
@ -1679,6 +1678,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
$this->setMotion(new Vector3(0, $expectedVelocity, 0));
|
||||
}elseif($this->kick("Flying is not enabled on this server")){
|
||||
$this->timings->stopTiming();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1688,6 +1688,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->checkTeleportPosition();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user