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.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index dc5864be3..77fde2a66 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -828,7 +828,6 @@ void Server::handleCommand_Damage(NetworkPacket* pkt)
PlayerHPChangeReason reason(PlayerHPChangeReason::FALL);
playersao->setHP((s32)playersao->getHP() - (s32)damage, reason);
- SendPlayerHPOrDie(playersao, reason);
}
}
@@ -1113,9 +1112,6 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
float time_from_last_punch =
playersao->resetTimeFromLastPunch();
- u16 src_original_hp = pointed_object->getHP();
- u16 dst_origin_hp = playersao->getHP();
-
u16 wear = pointed_object->punch(dir, &toolcap, playersao,
time_from_last_punch);
@@ -1125,18 +1121,6 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
if (changed)
playersao->setWieldedItem(selected_item);
- // If the object is a player and its HP changed
- if (src_original_hp != pointed_object->getHP() &&
- pointed_object->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
- SendPlayerHPOrDie((PlayerSAO *)pointed_object,
- PlayerHPChangeReason(PlayerHPChangeReason::PLAYER_PUNCH, playersao));
- }
-
- // If the puncher is a player and its HP changed
- if (dst_origin_hp != playersao->getHP())
- SendPlayerHPOrDie(playersao,
- PlayerHPChangeReason(PlayerHPChangeReason::PLAYER_PUNCH, pointed_object));
-
return;
} // action == INTERACT_START_DIGGING