aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/servercommand.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/servercommand.cpp b/src/servercommand.cpp
index 3c6868e36..f415c86ce 100644
--- a/src/servercommand.cpp
+++ b/src/servercommand.cpp
@@ -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.";