mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-24 09:11:43 +00:00
Fix a very bad bug.
This commit is contained in:
parent
01e0162d59
commit
b850d23496
1 changed files with 6 additions and 24 deletions
|
|
@ -15,37 +15,19 @@ module.exports.player = (player, serv) => {
|
||||||
if(!(player_from = serv.getPlayer(args[0])) || !(player_to = serv.getPlayer(args[1])))
|
if(!(player_from = serv.getPlayer(args[0])) || !(player_to = serv.getPlayer(args[1])))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
player_from._client.write('position', {
|
player_from.position = new Vec3(player_to.position.x/32, player_to.position.y/32, player_to.position.z/32);
|
||||||
x: player_to.position.x/32,
|
player_from.sendPosition();
|
||||||
y: player_to.position.x/32,
|
|
||||||
z: player_to.position.x/32,
|
|
||||||
yaw: player_to.yaw,
|
|
||||||
pitch: player_to.pitch,
|
|
||||||
flags: 0x00
|
|
||||||
});
|
|
||||||
} else if(args.length === 3) {
|
} else if(args.length === 3) {
|
||||||
player._client.write('position', {
|
player.position = new Vec3(args[0], args[1], args[2]);
|
||||||
x: args[0],
|
player.sendPosition();
|
||||||
y: args[1],
|
|
||||||
z: args[2],
|
|
||||||
yaw: player.yaw,
|
|
||||||
pitch: player.pitch,
|
|
||||||
flags: 0x00
|
|
||||||
});
|
|
||||||
} else if(args.length === 4) {
|
} else if(args.length === 4) {
|
||||||
let player_from;
|
let player_from;
|
||||||
|
|
||||||
if(!(player_from = serv.getPlayer(args[0])))
|
if(!(player_from = serv.getPlayer(args[0])))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
player_from._client.write('position', {
|
player_from.position = new Vec3(args[1], args[2], args[3]);
|
||||||
x: args[1],
|
player_from.sendPosition();
|
||||||
y: args[2],
|
|
||||||
z: args[3],
|
|
||||||
yaw: player_from.yaw,
|
|
||||||
pitch: player_from.pitch,
|
|
||||||
flags: 0x00
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue