diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-06-09 11:25:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-09 11:25:41 +0200 |
commit | a687efa6dfb97927d94db4d2f05970cde9d4181f (patch) | |
tree | f3f5712e65a12a20bc87beba95d8a2b6011bbb75 /src/network | |
parent | 2ba6785f090bcf0dbc6fadb77a6ec0fab84d0690 (diff) | |
download | minetest-a687efa6dfb97927d94db4d2f05970cde9d4181f.tar.gz minetest-a687efa6dfb97927d94db4d2f05970cde9d4181f.tar.bz2 minetest-a687efa6dfb97927d94db4d2f05970cde9d4181f.zip |
Damage: Play no damage sound when immortal (#8350)
Add isImmortal server-side for proper enable_damage handling
Rework log messages
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 7e9495d16..c81d15d5b 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -799,7 +799,7 @@ void Server::handleCommand_Damage(NetworkPacket* pkt) return; } - if (g_settings->getBool("enable_damage")) { + if (!playersao->isImmortal()) { if (playersao->isDead()) { verbosestream << "Server::ProcessData(): Info: " "Ignoring damage as player " << player->getName() @@ -1156,10 +1156,6 @@ void Server::handleCommand_Interact(NetworkPacket* pkt) if (pointed_object->isGone()) return; - actionstream<<player->getName()<<" punches object " - <<pointed.object_id<<": " - <<pointed_object->getDescription()<<std::endl; - ItemStack punchitem = playersao->getWieldedItemOrHand(); ToolCapabilities toolcap = punchitem.getToolCapabilities(m_itemdef); |