mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Allow server-side teleporting
This commit is contained in:
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.";
|
||||
|
Loading…
Reference in New Issue
Block a user