Don't handle PlayerPos packet coming from client if player is dead
authorLoic Blot <loic.blot@unix-experience.fr>
Thu, 12 Mar 2015 09:32:16 +0000 (10:32 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Thu, 12 Mar 2015 09:32:16 +0000 (10:32 +0100)
src/network/packethandlers/server.cpp

index a11e8dc2fd08e66762a535d4527a9924f3137364..d24e8df5b3f9e0431f92d382e7f2da0a1ebe850c 100644 (file)
@@ -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: "