Allow server-side teleporting
parent
218b626016
commit
8492796a5c
|
@ -222,7 +222,11 @@ void cmd_teleport(std::wostringstream &os,
|
||||||
<<PP(ctx->player->getPosition()/BS)<<" to "
|
<<PP(ctx->player->getPosition()/BS)<<" to "
|
||||||
<<PP(dest/BS)<<std::endl;
|
<<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);
|
ctx->server->SendMovePlayer(ctx->player);
|
||||||
|
|
||||||
os<< L"-!- Teleported.";
|
os<< L"-!- Teleported.";
|
||||||
|
|
Loading…
Reference in New Issue