From 10ef430baefcf8e6ada0dcb853a2228867c5dd40 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Nov 2016 14:18:13 +0100 Subject: [PATCH] Revert "Do not allow DMG_FORCED to penetrate player ultimate degreelessness/buddha." This reverts commit 0130bde07740e5717a3c7c796a3c8c06ad6a99fd. This wasn't supposed to get merged, so get rid of it again. The change in semantics here is not acceptable. --- src/p_interaction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index ec8b5e4955..b4ecc827eb 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1254,10 +1254,11 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, damage = target->health - 1; } + if (!(flags & DMG_FORCED)) { // check the real player, not a voodoo doll here for invulnerability effects if ((!telefragDamage && ((player->mo->flags2 & MF2_INVULNERABLE) || - (player->cheats & CF_GODMODE)) && !(flags & DMG_FORCED)) || + (player->cheats & CF_GODMODE))) || (player->cheats & CF_GODMODE2) || (player->mo->flags5 & MF5_NODAMAGE)) //Absolutely no hurting if NODAMAGE is involved. Same for GODMODE2. { // player is invulnerable, so don't hurt him @@ -1330,8 +1331,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, // but telefragging should still do enough damage to kill the player) // Ignore players that are already dead. // [MC]Buddha2 absorbs telefrag damage, and anything else thrown their way. - if ((((player->cheats & CF_BUDDHA2) || - (((player->cheats & CF_BUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && !telefragDamage && !(flags & DMG_FORCED))) && (player->playerstate != PST_DEAD))) + if (!(flags & DMG_FORCED) && (((player->cheats & CF_BUDDHA2) || (((player->cheats & CF_BUDDHA) || (player->mo->flags7 & MF7_BUDDHA)) && !telefragDamage)) && (player->playerstate != PST_DEAD))) { // If this is a voodoo doll we need to handle the real player as well. player->mo->health = target->health = player->health = 1;