Skip to content

Commit

Permalink
Fix unwanted detaching when damage = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
programmerjake authored and sfan5 committed Oct 5, 2019
1 parent 81c2370 commit 7603215
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/client/content_cao.cpp
Expand Up @@ -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
Expand All @@ -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'
Expand Down

0 comments on commit 7603215

Please sign in to comment.