mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
parent
da71e86633
commit
f195db2d14
5 changed files with 27 additions and 3 deletions
|
@ -2784,9 +2784,10 @@ void Server::RespawnPlayer(session_t peer_id)
|
|||
<< playersao->getPlayer()->getName()
|
||||
<< " respawns" << std::endl;
|
||||
|
||||
playersao->setHP(playersao->accessObjectProperties()->hp_max,
|
||||
const auto *prop = playersao->accessObjectProperties();
|
||||
playersao->setHP(prop->hp_max,
|
||||
PlayerHPChangeReason(PlayerHPChangeReason::RESPAWN));
|
||||
playersao->setBreath(playersao->accessObjectProperties()->breath_max);
|
||||
playersao->setBreath(prop->breath_max);
|
||||
|
||||
bool repositioned = m_script->on_respawnplayer(playersao);
|
||||
if (!repositioned) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue