From 6ea558f8ac57a391b6f54c534441f930b0609cea Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Tue, 12 Oct 2021 21:12:49 +0300 Subject: Fix player HP desync between client and server --- src/network/serverpackethandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/network/serverpackethandler.cpp') diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 4c609644f..dc7be0e23 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -826,7 +826,8 @@ void Server::handleCommand_Damage(NetworkPacket* pkt) << std::endl; PlayerHPChangeReason reason(PlayerHPChangeReason::FALL); - playersao->setHP((s32)playersao->getHP() - (s32)damage, reason); + playersao->setHP((s32)playersao->getHP() - (s32)damage, reason, false); + SendPlayerHPOrDie(playersao, reason); // correct client side prediction } } -- cgit v1.2.3