mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-20 19:45:22 +02:00
Don't call on_dieplayer callback two times (#11874)
This commit is contained in:
@@ -819,8 +819,7 @@ void Server::handleCommand_Damage(NetworkPacket* pkt)
|
||||
<< std::endl;
|
||||
|
||||
PlayerHPChangeReason reason(PlayerHPChangeReason::FALL);
|
||||
playersao->setHP((s32)playersao->getHP() - (s32)damage, reason, false);
|
||||
SendPlayerHPOrDie(playersao, reason); // correct client side prediction
|
||||
playersao->setHP((s32)playersao->getHP() - (s32)damage, reason, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user