diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 431c637de..b4db7cb0b 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1415,15 +1415,19 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da } } - IFVIRTUALPTR(source, AActor, OnDrain) + if (draindamage > 0) { - VMValue params[] = { source, target, draindamage, mod.GetIndex() }; - VMReturn ret(&draindamage); - GlobalVMStack.Call(func, params, countof(params), &ret, 1); - } - if ( P_GiveBody( source, int(draindamage * damage))) - { - S_Sound(source, CHAN_ITEM, "*drainhealth", 1, ATTN_NORM ); + int draindmg = int(draindamage * damage); + IFVIRTUALPTR(source, AActor, OnDrain) + { + VMValue params[] = { source, target, draindmg, mod.GetIndex() }; + VMReturn ret(&draindmg); + GlobalVMStack.Call(func, params, countof(params), &ret, 1); + } + if (P_GiveBody(source, draindmg)) + { + S_Sound(source, CHAN_ITEM, "*drainhealth", 1, ATTN_NORM); + } } } } diff --git a/wadsrc/static/zscript/hexen/clericflame.txt b/wadsrc/static/zscript/hexen/clericflame.txt index d222a07db..1978f43f1 100644 --- a/wadsrc/static/zscript/hexen/clericflame.txt +++ b/wadsrc/static/zscript/hexen/clericflame.txt @@ -274,6 +274,7 @@ class CFlameMissile : FastProjectile void A_CFlamePuff() { bInvisible = false; + bMissile = false; Vel = (0,0,0); A_PlaySound ("ClericFlameExplode", CHAN_BODY); } diff --git a/wadsrc/static/zscript/shared/fastprojectile.txt b/wadsrc/static/zscript/shared/fastprojectile.txt index 657c4680e..a0fa1a91c 100644 --- a/wadsrc/static/zscript/shared/fastprojectile.txt +++ b/wadsrc/static/zscript/shared/fastprojectile.txt @@ -156,7 +156,7 @@ class FastProjectile : Actor ExplodeMissile (NULL, NULL); return; } - if (!(frac.xy ~== (0, 0)) && ripcount <= 0) + if (changexy && ripcount <= 0) { ripcount = count >> 3;