mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Reset the old HP method on PlayerSAO::setHP
This commit is contained in:
parent
538036d004
commit
2676d289d9
1 changed files with 4 additions and 0 deletions
|
@ -1072,6 +1072,10 @@ void PlayerSAO::setHP(s16 hp)
|
||||||
else if (hp > PLAYER_MAX_HP)
|
else if (hp > PLAYER_MAX_HP)
|
||||||
hp = PLAYER_MAX_HP;
|
hp = PLAYER_MAX_HP;
|
||||||
|
|
||||||
|
if(hp < oldhp && g_settings->getBool("enable_damage") == false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_player->hp = hp;
|
m_player->hp = hp;
|
||||||
|
|
||||||
if (oldhp > hp)
|
if (oldhp > hp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue