Added +NODECAL and +FORCEDECAL actor flags

Added FHF_NOIMPACTDECAL for LineAttack
This commit is contained in:
Benjamin Moir 2015-01-20 12:05:00 +10:30
commit 6dff8da503
5 changed files with 19 additions and 7 deletions

View file

@ -3714,13 +3714,17 @@ AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
}
// [RH] Spawn a decal
if (trace.HitType == TRACE_HitWall && trace.Line->special != Line_Horizon)
if (trace.HitType == TRACE_HitWall && trace.Line->special != Line_Horizon && !(flags & LAF_NOIMPACTDECAL) && !(puffDefaults->flags7 & MF7_NODECAL))
{
// [TN] If the actor or weapon has a decal defined, use that one.
if (t1->DecalGenerator != NULL ||
(t1->player != NULL && t1->player->ReadyWeapon != NULL && t1->player->ReadyWeapon->DecalGenerator != NULL))
{
SpawnShootDecal(t1, trace);
// [ZK] If puff has FORCEDECAL set, do not use the weapon's decal
if (puffDefaults->flags7 & MF7_FORCEDECAL && puff != NULL && puff->DecalGenerator)
SpawnShootDecal(puff, trace);
else
SpawnShootDecal(t1, trace);
}
// Else, look if the bulletpuff has a decal defined.