Use puff decal with MF7_FORCEDECAL

This commit is contained in:
Edward Richardson 2015-06-25 12:53:46 +12:00
parent ffa77ff7a6
commit 8670b7ecf7

View file

@ -4275,11 +4275,16 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
// Spawn a decal or puff at the point where the trace ended.
if (trace.HitType == TRACE_HitWall)
{
SpawnShootDecal(source, trace);
AActor* puff = NULL;
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
{
P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
}
if (puff != NULL && puffDefaults->flags7 & MF7_FORCEDECAL && puff->DecalGenerator)
SpawnShootDecal(puff, trace);
else
SpawnShootDecal(source, trace);
}
if (thepuff != NULL)