Skip to content
Permalink
Browse files

Minor bug fix (lag between damage flash and hearts updating)

  • Loading branch information
Zeno- committed Mar 17, 2015
1 parent c552d29 commit dbe5a446c3de175a30f1e7070c8623e975a6e48f
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/environment.cpp
@@ -2562,11 +2562,13 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp)
{
LocalPlayer *lplayer = getLocalPlayer();
assert(lplayer);

if (handle_hp && lplayer->hp > damage)
lplayer->hp -= damage;
else
lplayer->hp = 0;

if (handle_hp) {
if (lplayer->hp > damage)
lplayer->hp -= damage;
else
lplayer->hp = 0;
}

ClientEnvEvent event;
event.type = CEE_PLAYER_DAMAGE;

0 comments on commit dbe5a44

Please sign in to comment.