Fixed players don't see teleport movement, close #921

This commit is contained in:
Dylan K. Taylor 2017-06-05 16:47:12 +01:00
parent 54453d0b0a
commit e83ffd5afe

View File

@ -4018,6 +4018,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
} }
$this->sendPosition($this, null, null, MovePlayerPacket::MODE_RESET); $this->sendPosition($this, null, null, MovePlayerPacket::MODE_RESET);
//This only needs to be sent to players who could see us before the teleport.
$this->sendPosition($this, null, null, MovePlayerPacket::MODE_RESET, $this->getViewers());
$this->spawnToAll(); $this->spawnToAll();
$this->forceMovement = $this->teleportPosition; $this->forceMovement = $this->teleportPosition;
$this->teleportPosition = null; $this->teleportPosition = null;