mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Damage: Play no damage sound when immortal (#8350)
Add isImmortal server-side for proper enable_damage handling Rework log messages
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user