From 4a7567107f67c2bd4e9dac6e020207c3e32bc2a7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 13 Jun 2011 10:27:24 +0000 Subject: [PATCH] - added DavifPH's submission for allowing THRUGHOST on puffs. SVN r3232 (trunk) --- src/p_map.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index ca02e5438..f72a62004 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3374,13 +3374,14 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, shootz += 8*FRACUNIT; } - hitGhosts = (t1->player != NULL && - t1->player->ReadyWeapon != NULL && - (t1->player->ReadyWeapon->flags2 & MF2_THRUGHOST)); - // We need to check the defaults of the replacement here AActor *puffDefaults = GetDefaultByType(pufftype->GetReplacement()); + hitGhosts = (t1->player != NULL && + t1->player->ReadyWeapon != NULL && + (t1->player->ReadyWeapon->flags2 & MF2_THRUGHOST)) || + (puffDefaults && (puffDefaults->flags2 & MF2_THRUGHOST)); + // if the puff uses a non-standard damage type this will override default and melee damage type. // All other explicitly passed damage types (currenty only MDK) will be preserved. if ((damageType == NAME_None || damageType == NAME_Melee) && puffDefaults->DamageType != NAME_None)