fix 2 bugs in login : send the update health packet + send named_entity_spawn as fixed point

This commit is contained in:
Romain Beaumont 2015-10-12 21:46:55 +02:00
parent 37db96d8a1
commit c26b11bb74
2 changed files with 4 additions and 4 deletions

View file

@ -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");

View file

@ -183,7 +183,6 @@ function inject(serv,settings)
});
player.on('modpe', function (command) {
console.log(command);
try {
procCmd(command);
}