Skip to content

Commit dbe5a44

Browse files
committedMar 17, 2015
Minor bug fix (lag between damage flash and hearts updating)
1 parent c552d29 commit dbe5a44

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

Diff for: ‎src/environment.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -2562,11 +2562,13 @@ void ClientEnvironment::damageLocalPlayer(u8 damage, bool handle_hp)
25622562
{
25632563
LocalPlayer *lplayer = getLocalPlayer();
25642564
assert(lplayer);
2565-
2566-
if (handle_hp && lplayer->hp > damage)
2567-
lplayer->hp -= damage;
2568-
else
2569-
lplayer->hp = 0;
2565+
2566+
if (handle_hp) {
2567+
if (lplayer->hp > damage)
2568+
lplayer->hp -= damage;
2569+
else
2570+
lplayer->hp = 0;
2571+
}
25702572

25712573
ClientEnvEvent event;
25722574
event.type = CEE_PLAYER_DAMAGE;

0 commit comments

Comments
 (0)
Please sign in to comment.