diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-12 10:32:16 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-03-12 10:32:16 +0100 |
commit | 3067d782169a79ab3b13e8ba3d445b60d0d477c5 (patch) | |
tree | cd64e5cde0726603c57e8b64a433916a9fcc42e0 /src/network/packethandlers | |
parent | 6ce0985f47b874839947e3be503c302bec532206 (diff) | |
download | minetest-3067d782169a79ab3b13e8ba3d445b60d0d477c5.tar.gz minetest-3067d782169a79ab3b13e8ba3d445b60d0d477c5.tar.bz2 minetest-3067d782169a79ab3b13e8ba3d445b60d0d477c5.zip |
Don't handle PlayerPos packet coming from client if player is dead
Diffstat (limited to 'src/network/packethandlers')
-rw-r--r-- | src/network/packethandlers/server.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/packethandlers/server.cpp b/src/network/packethandlers/server.cpp index a11e8dc2f..d24e8df5b 100644 --- a/src/network/packethandlers/server.cpp +++ b/src/network/packethandlers/server.cpp @@ -555,6 +555,11 @@ void Server::handleCommand_PlayerPos(NetworkPacket* pkt) return; } + // If player is dead we don't care of this packet + if (player->hp == 0) { + return; + } + PlayerSAO *playersao = player->getPlayerSAO(); if (playersao == NULL) { errorstream << "Server::ProcessData(): Cancelling: " |