X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshared%2Fcli.cpp;h=6942f78704ec3a887dabff21fd35df37e0a6ba51;hb=56069d41c1553d87a8759713ef391d3a908adc0e;hp=aa6629f34741221e9cd45fe10ac71360333e58d3;hpb=10a310869c61cc52046e165f36ac9639fe9d0c69;p=blank.git diff --git a/src/shared/cli.cpp b/src/shared/cli.cpp index aa6629f..6942f78 100644 --- a/src/shared/cli.cpp +++ b/src/shared/cli.cpp @@ -72,12 +72,8 @@ CLI::Command::~Command() { void TeleportCommand::Execute(CLI &cli, Player &player, TokenStreamReader &args) { glm::vec3 pos(args.GetFloat(), args.GetFloat(), args.GetFloat()); - glm::ivec3 chunk(pos); - chunk /= Chunk::Extent(); - pos -= chunk; EntityState state = player.GetEntity().GetState(); - state.chunk_pos = chunk; - state.block_pos = pos; + state.pos = ExactLocation(pos).Sanitize(); player.GetEntity().SetState(state); }