mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Respect object property hp_max field for players (#6287)
* Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
This commit is contained in:
@@ -2588,7 +2588,7 @@ void Server::RespawnPlayer(u16 peer_id)
|
||||
<< playersao->getPlayer()->getName()
|
||||
<< " respawns" << std::endl;
|
||||
|
||||
playersao->setHP(PLAYER_MAX_HP);
|
||||
playersao->setHP(playersao->accessObjectProperties()->hp_max);
|
||||
playersao->setBreath(PLAYER_MAX_BREATH);
|
||||
|
||||
bool repositioned = m_script->on_respawnplayer(playersao);
|
||||
|
Reference in New Issue
Block a user