mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Send Position packet on event, don't check it at each AsyncRunStep.
* This permit to cleanup the player checking loop
This commit is contained in:
parent
7f8f9785d7
commit
40bf1d7b5f
5 changed files with 10 additions and 45 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue