mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Minor bug fix (lag between damage flash and hearts updating)
This commit is contained in:
@@ -2563,10 +2563,12 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp)
|
||||
LocalPlayer *lplayer = getLocalPlayer();
|
||||
assert(lplayer);
|
||||
|
||||
if (handle_hp && lplayer->hp > damage)
|
||||
if (handle_hp) {
|
||||
if (lplayer->hp > damage)
|
||||
lplayer->hp -= damage;
|
||||
else
|
||||
lplayer->hp = 0;
|
||||
}
|
||||
|
||||
ClientEnvEvent event;
|
||||
event.type = CEE_PLAYER_DAMAGE;
|
||||
|
Reference in New Issue
Block a user