projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c552d29
)
Minor bug fix (lag between damage flash and hearts updating)
author
Craig Robbins
<kde.psych@gmail.com>
Tue, 17 Mar 2015 07:39:59 +0000
(17:39 +1000)
committer
Craig Robbins
<kde.psych@gmail.com>
Tue, 17 Mar 2015 07:39:59 +0000
(17:39 +1000)
src/environment.cpp
patch
|
blob
|
history
diff --git
a/src/environment.cpp
b/src/environment.cpp
index f83414a6a2a4ebd91c1baecbe60b2d243f7cad78..9fbc8c519642013493f87d95a1fe87e0645ef47c 100644
(file)
--- a/
src/environment.cpp
+++ b/
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;