mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
2ba6785f09
commit
a687efa6df
4 changed files with 29 additions and 38 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue