mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Remove movement workaround from 1.14.30 (#4246)
This commit is contained in:
parent
af79e787ea
commit
8e2829bdd4
@ -51,7 +51,6 @@ use pocketmine\network\mcpe\protocol\ActorEventPacket;
|
|||||||
use pocketmine\network\mcpe\protocol\AddPlayerPacket;
|
use pocketmine\network\mcpe\protocol\AddPlayerPacket;
|
||||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||||
use pocketmine\network\mcpe\protocol\MovePlayerPacket;
|
|
||||||
use pocketmine\network\mcpe\protocol\PlayerListPacket;
|
use pocketmine\network\mcpe\protocol\PlayerListPacket;
|
||||||
use pocketmine\network\mcpe\protocol\PlayerSkinPacket;
|
use pocketmine\network\mcpe\protocol\PlayerSkinPacket;
|
||||||
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
|
||||||
@ -831,23 +830,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function broadcastMovement(bool $teleport = false) : void{
|
|
||||||
//TODO: workaround 1.14.30 bug: MoveActor(Absolute|Delta)Packet don't work on players anymore :(
|
|
||||||
$pk = new MovePlayerPacket();
|
|
||||||
$pk->entityRuntimeId = $this->getId();
|
|
||||||
$pk->position = $this->getOffsetPosition($this);
|
|
||||||
$pk->yaw = $this->yaw;
|
|
||||||
$pk->pitch = $this->pitch;
|
|
||||||
$pk->headYaw = $this->yaw;
|
|
||||||
$pk->mode = $teleport ? MovePlayerPacket::MODE_TELEPORT : MovePlayerPacket::MODE_NORMAL;
|
|
||||||
|
|
||||||
//we can't assume that everyone who is using our chunk wants to see this movement,
|
|
||||||
//because this human might be a player who shouldn't be receiving his own movement.
|
|
||||||
//this didn't matter when we were able to use MoveActorPacket because
|
|
||||||
//the client just ignored MoveActor for itself, but it doesn't ignore MovePlayer for itself.
|
|
||||||
$this->server->broadcastPacket($this->hasSpawned, $pk);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function close() : void{
|
public function close() : void{
|
||||||
if(!$this->closed){
|
if(!$this->closed){
|
||||||
if($this->inventory !== null){
|
if($this->inventory !== null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user