aboutsummaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r--src/network/serverpackethandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index e0ea4bf83..95df6fc4f 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -1107,6 +1107,13 @@ void Server::handleCommand_Damage(NetworkPacket* pkt)
}
if (g_settings->getBool("enable_damage")) {
+ if (playerSAO->isDead()) {
+ verbosestream << "Server::ProcessData(): Info: "
+ "Ignoring damage as player " << player->getName()
+ << " is already dead." << std::endl;
+ return;
+ }
+
actionstream << player->getName() << " damaged by "
<< (int)damage << " hp at " << PP(playersao->getBasePosition() / BS)
<< std::endl;