Skip to content
Snippets Groups Projects
Commit 8492796a authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Allow server-side teleporting

parent 218b6260
No related branches found
No related tags found
No related merge requests found
......@@ -222,7 +222,11 @@ void cmd_teleport(std::wostringstream &os,
<<PP(ctx->player->getPosition()/BS)<<" to "
<<PP(dest/BS)<<std::endl;
ctx->player->setPosition(dest);
//ctx->player->setPosition(dest);
// Use the ServerActiveObject interface of ServerRemotePlayer
ServerRemotePlayer *srp = (ServerRemotePlayer*)ctx->player;
srp->setPos(dest);
ctx->server->SendMovePlayer(ctx->player);
os<< L"-!- Teleported.";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment