]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/damagetext/cl_damagetext.qc
Fix damagetext not stopping damage accumulation after enemy's death
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / damagetext / cl_damagetext.qc
index 8383626fc718733f0cfc76f0e5daa69b1166df76..c49ebb7e56ae62dcff1844e335278a33e5549965 100644 (file)
@@ -268,9 +268,11 @@ NET_HANDLE(damagetext, bool isNew)
                // disown the parent entity from this DamageText
                // and (likely) give the entity a new DT afterwards
                // this should only cancel damage accumulation for this DT
-               if ((autocvar_cl_damagetext_accumulate_lifetime >= 0) // negative never disowns
-               && (time - it.hit_time > autocvar_cl_damagetext_accumulate_lifetime)
-               && (current_alpha(it) > alphathreshold))
+
+               if (flags & DTFLAG_STOP_ACCUMULATION
+                       || ((autocvar_cl_damagetext_accumulate_lifetime >= 0) // negative never disowns
+                               && (time - it.hit_time > autocvar_cl_damagetext_accumulate_lifetime)
+                               && (current_alpha(it) > alphathreshold)))
                {
                        it.m_group = 0;
                }