mirror of
https://github.com/danbulant/flying-squid
synced 2026-07-06 11:40:46 +00:00
The magic of 32.
This commit is contained in:
parent
b850d23496
commit
844558dd89
1 changed files with 3 additions and 3 deletions
|
|
@ -15,10 +15,10 @@ 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.position = new Vec3(player_to.position.x/32, player_to.position.y/32, player_to.position.z/32);
|
player_from.position = new Vec3(player_to.position.x, player_to.position.y, player_to.position.z);
|
||||||
player_from.sendPosition();
|
player_from.sendPosition();
|
||||||
} else if(args.length === 3) {
|
} else if(args.length === 3) {
|
||||||
player.position = new Vec3(args[0], args[1], args[2]);
|
player.position = new Vec3(args[0]*32, args[1]*32, args[2]*32);
|
||||||
player.sendPosition();
|
player.sendPosition();
|
||||||
} else if(args.length === 4) {
|
} else if(args.length === 4) {
|
||||||
let player_from;
|
let player_from;
|
||||||
|
|
@ -26,7 +26,7 @@ module.exports.player = (player, serv) => {
|
||||||
if(!(player_from = serv.getPlayer(args[0])))
|
if(!(player_from = serv.getPlayer(args[0])))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
player_from.position = new Vec3(args[1], args[2], args[3]);
|
player_from.position = new Vec3(args[1]*32, args[2]*32, args[3]*32);
|
||||||
player_from.sendPosition();
|
player_from.sendPosition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue