- added DavifPH's submission for allowing THRUGHOST on puffs.

SVN r3232 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-13 10:27:24 +00:00
parent ab60afd0b8
commit 4a7567107f

View file

@ -3374,13 +3374,14 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
shootz += 8*FRACUNIT; 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 // We need to check the defaults of the replacement here
AActor *puffDefaults = GetDefaultByType(pufftype->GetReplacement()); 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. // 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. // All other explicitly passed damage types (currenty only MDK) will be preserved.
if ((damageType == NAME_None || damageType == NAME_Melee) && puffDefaults->DamageType != NAME_None) if ((damageType == NAME_None || damageType == NAME_Melee) && puffDefaults->DamageType != NAME_None)