Fix unwanted detaching when damage = 0

This commit is contained in:
Jacob Lifshay 2019-09-28 19:30:58 -07:00 committed by sfan5
parent 81c2370c8b
commit 76032159bd

@ -1555,7 +1555,7 @@ void GenericCAO::processMessage(const std::string &data)
if (damage > 0) if (damage > 0)
{ {
if (m_hp <= 0) if (m_hp == 0)
{ {
// TODO: Execute defined fast response // TODO: Execute defined fast response
// As there is no definition, make a smoke puff // 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; m_reset_textures_timer += 0.05 * damage;
updateTextures(m_current_texture_modifier + "^[brighten"); updateTextures(m_current_texture_modifier + "^[brighten");
} }
} else { }
if (m_hp == 0) {
// Same as 'Server::DiePlayer' // Same as 'Server::DiePlayer'
clearParentAttachment(); clearParentAttachment();
// Same as 'ObjectRef::l_remove' // Same as 'ObjectRef::l_remove'