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:
81c2370
)
Fix unwanted detaching when damage = 0
author
Jacob Lifshay
<programmerjake@gmail.com>
Sun, 29 Sep 2019 02:30:58 +0000
(19:30 -0700)
committer
sfan5
<sfan5@live.de>
Sat, 5 Oct 2019 13:45:05 +0000
(15:45 +0200)
src/client/content_cao.cpp
patch
|
blob
|
history
diff --git
a/src/client/content_cao.cpp
b/src/client/content_cao.cpp
index 71646840260885a79227f47566f1d5896da3e4b0..934f4354eb7e8066091d639b0cf9c6c2a4fa51ca 100644
(file)
--- a/
src/client/content_cao.cpp
+++ b/
src/client/content_cao.cpp
@@
-1555,7
+1555,7
@@
void GenericCAO::processMessage(const std::string &data)
if (damage > 0)
{
- if (m_hp
<
= 0)
+ if (m_hp
=
= 0)
{
// TODO: Execute defined fast response
// As there is no definition, make a smoke puff
@@
-1571,7
+1571,9
@@
void GenericCAO::processMessage(const std::string &data)
m_reset_textures_timer += 0.05 * damage;
updateTextures(m_current_texture_modifier + "^[brighten");
}
- } else {
+ }
+
+ if (m_hp == 0) {
// Same as 'Server::DiePlayer'
clearParentAttachment();
// Same as 'ObjectRef::l_remove'