From c26b11bb74d3f4fa263fc283faf2068b61502fcc Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Mon, 12 Oct 2015 21:46:55 +0200 Subject: [PATCH] fix 2 bugs in login : send the update health packet + send named_entity_spawn as fixed point --- src/lib/playerPlugins/login.js | 7 ++++--- src/lib/serverPlugins/modpe.js | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/playerPlugins/login.js b/src/lib/playerPlugins/login.js index 333577a..c1663db 100644 --- a/src/lib/playerPlugins/login.js +++ b/src/lib/playerPlugins/login.js @@ -207,9 +207,9 @@ function inject(serv,player) player._writeOthers('named_entity_spawn',{ entityId: player.entity.id, playerUUID: player._client.uuid, - x: player.entity.position.x/32, - y: player.entity.position.y/32, - z: player.entity.position.z/32, + x: player.entity.position.x, + y: player.entity.position.y, + z: player.entity.position.z, yaw: player.entity.yaw, pitch: player.entity.pitch, currentItem: 0, @@ -240,6 +240,7 @@ function inject(serv,player) await sendMap(); sendSpawnPosition(); sendInitialPosition(); + player.updateHealth(player.entity.health); player.emit("spawned"); diff --git a/src/lib/serverPlugins/modpe.js b/src/lib/serverPlugins/modpe.js index e15d66c..37e4b19 100644 --- a/src/lib/serverPlugins/modpe.js +++ b/src/lib/serverPlugins/modpe.js @@ -183,7 +183,6 @@ function inject(serv,settings) }); player.on('modpe', function (command) { - console.log(command); try { procCmd(command); }