diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-04 12:19:26 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-04 12:19:26 +0100 |
commit | 40bf1d7b5f2a190ae89885c9ea99f52c476ea6be (patch) | |
tree | a8547067308dd42775ee54f3aeed7009a7559d95 /src/network | |
parent | 7f8f9785d7e9e120a6708d2f51e32dfef3e50c19 (diff) | |
download | minetest-40bf1d7b5f2a190ae89885c9ea99f52c476ea6be.tar.gz minetest-40bf1d7b5f2a190ae89885c9ea99f52c476ea6be.tar.bz2 minetest-40bf1d7b5f2a190ae89885c9ea99f52c476ea6be.zip |
Send Position packet on event, don't check it at each AsyncRunStep.
* This permit to cleanup the player checking loop
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/packethandlers/server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/packethandlers/server.cpp b/src/network/packethandlers/server.cpp index 9dd1c95dd..526c17344 100644 --- a/src/network/packethandlers/server.cpp +++ b/src/network/packethandlers/server.cpp @@ -579,10 +579,10 @@ void Server::handleCommand_PlayerPos(NetworkPacket* pkt) player->control.LMB = (keyPressed & 128); player->control.RMB = (keyPressed & 256); - bool cheated = playersao->checkMovementCheat(); - if (cheated) { + if (playersao->checkMovementCheat()) { // Call callbacks m_script->on_cheat(playersao, "moved_too_fast"); + SendMovePlayer(pkt->getPeerId()); } } |