aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-12 10:32:16 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-12 10:32:16 +0100
commit3067d782169a79ab3b13e8ba3d445b60d0d477c5 (patch)
treecd64e5cde0726603c57e8b64a433916a9fcc42e0 /src
parent6ce0985f47b874839947e3be503c302bec532206 (diff)
downloadminetest-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')
-rw-r--r--src/network/packethandlers/server.cpp5
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: "