diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 3c6868e..f415c86 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -222,7 +222,11 @@ void cmd_teleport(std::wostringstream &os, <player->getPosition()/BS)<<" to " <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.";