From afb19f3a1f73d36207b8b64e4eed5846e78f5a32 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 12 Mar 2015 11:27:28 +0100 Subject: handleCommand_Breath mustn't update breath is player is dead. A dead player doesn't breath. Add Player::isDead function to check player is dead --- src/network/packethandlers/server.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/network') diff --git a/src/network/packethandlers/server.cpp b/src/network/packethandlers/server.cpp index d24e8df5b..b188bb931 100644 --- a/src/network/packethandlers/server.cpp +++ b/src/network/packethandlers/server.cpp @@ -916,6 +916,15 @@ void Server::handleCommand_Breath(NetworkPacket* pkt) return; } + /* + * If player is dead, we don't need to update the breath + * He is dead ! + */ + if (player->isDead()) { + return; + } + + PlayerSAO *playersao = player->getPlayerSAO(); if (playersao == NULL) { errorstream << "Server::ProcessData(): Cancelling: " -- cgit v1.2.3