From e0f666d30bacc1f362857a63fcedf4b3d2ca8aa1 Mon Sep 17 00:00:00 2001 From: Henry3230 <2703436416@qq.com> Date: Mon, 24 Jun 2024 22:28:16 +0000 Subject: [PATCH] MobjDamage hook tweaks for special stages --- src/p_inter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_inter.c b/src/p_inter.c index e73cd1fce..cbd56183d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -3786,6 +3786,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da if (player->powers[pw_carry] == CR_NIGHTSMODE) // NiGHTS damage handling { + if (player->powers[pw_flashing]) + return false; if (!force) { if (source == target) @@ -3803,6 +3805,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da if (G_IsSpecialStage(gamemap) && !(damagetype & DMG_DEATHMASK)) { + if (player->powers[pw_flashing]) + return false; + if (LUA_HookMobjDamage(target, inflictor, source, damage, damagetype)) + return true; P_SpecialStageDamage(player, inflictor, source); return true; }