mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
This commit is contained in:
@@ -494,7 +494,7 @@ abstract class Entity extends Position implements Metadatable{
|
||||
Server::broadcastPacket($this->hasSpawned, $pk);
|
||||
}
|
||||
|
||||
if(!($this instanceof Player) and ($this->lastMotionX != $this->motionX or $this->lastMotionY != $this->motionY or $this->lastMotionZ != $this->motionZ)){
|
||||
if(($this->lastMotionX != $this->motionX or $this->lastMotionY != $this->motionY or $this->lastMotionZ != $this->motionZ)){
|
||||
$this->lastMotionX = $this->motionX;
|
||||
$this->lastMotionY = $this->motionY;
|
||||
$this->lastMotionZ = $this->motionZ;
|
||||
@@ -504,6 +504,12 @@ abstract class Entity extends Position implements Metadatable{
|
||||
[$this->getID(), $this->motionX, $this->motionY, $this->motionZ]
|
||||
];
|
||||
Server::broadcastPacket($this->hasSpawned, $pk);
|
||||
|
||||
if($this instanceof Player){
|
||||
$this->motionX = 0;
|
||||
$this->motionY = 0;
|
||||
$this->motionZ = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,10 +646,10 @@ abstract class Entity extends Position implements Metadatable{
|
||||
$entity->despawnFrom($this);
|
||||
}
|
||||
|
||||
$pk = new UnloadChunkPacket();
|
||||
/*$pk = new UnloadChunkPacket();
|
||||
$pk->chunkX = $X;
|
||||
$pk->chunkZ = $Z;
|
||||
$this->dataPacket($pk);
|
||||
$this->dataPacket($pk);*/
|
||||
}
|
||||
$this->getLevel()->freeAllChunks($this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user