From ab3862446c06992b581d794a2d30011ebcebc43e Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Mon, 17 Dec 2012 16:40:44 +0100 Subject: [PATCH] Fixed teleport crash --- TODO | 3 ++- classes/API/PlayerAPI.php | 10 +++++----- classes/Session.class.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index b1d4efc60..0dfe2a669 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ - Save placed blocks and relay them to other players. - Fix spawn position resetting to 0,128,0 -- Mob spawning, item pick up \ No newline at end of file +- Mob spawning, item pick up +- Fix metadata orientation \ No newline at end of file diff --git a/classes/API/PlayerAPI.php b/classes/API/PlayerAPI.php index cbfb25853..2e699865e 100644 --- a/classes/API/PlayerAPI.php +++ b/classes/API/PlayerAPI.php @@ -96,11 +96,11 @@ class PlayerAPI{ public function tppos($name, $x, $y, $z){ $player = $this->get($name); if($player !== false){ - $this->player->dataPacket(MC_MOVE_PLAYER, array( - "eid" => $player->eid, - "x" => $player->x, - "y" => $player->y, - "z" => $player->z, + $player->dataPacket(MC_MOVE_PLAYER, array( + "eid" => 0, + "x" => $x, + "y" => $y, + "z" => $z, "yaw" => 0, "pitch" => 0, )); diff --git a/classes/Session.class.php b/classes/Session.class.php index c2b059750..495cc0b79 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -276,7 +276,7 @@ class Session{ "z" => $this->data["spawn"]["z"], "unknown1" => 0, "gamemode" => $this->server->gamemode, - "eid" => $this->eid, + "eid" => 0, )); break; case MC_READY: