mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Don't call on_dieplayer callback two times (#11874)
This commit is contained in:
parent
76e97e85a0
commit
72b14bd994
5 changed files with 41 additions and 60 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue