Allow server-side teleporting

This commit is contained in:
Perttu Ahola 2011-11-27 05:14:46 +02:00
parent 218b626016
commit 8492796a5c

@ -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.";