From 8670b7ecf79a91cd4d64025bb11393b8b931afb1 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Thu, 25 Jun 2015 12:53:46 +1200 Subject: [PATCH] Use puff decal with MF7_FORCEDECAL --- src/p_map.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 197525aa4..26312d922 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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)