From 1e81eb0fee24178b92d7ee5c7930def846088e94 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 24 Mar 2008 22:06:26 +0000 Subject: [PATCH] - Added Thomas's submissions for decal assignment to puffs and NOINFIGHTING flag. SVN r847 (trunk) --- docs/rh-log.txt | 1 + src/p_interaction.cpp | 5 +++-- src/p_map.cpp | 20 ++++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 00bacfc5a..1bacdaf48 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ March 24, 2008 (Changes by Graf Zahl) +- Added Thomas's submissions for decal assignment to puffs and NOINFIGHTING flag. - Reverted changes of r715 in v_collection.cpp because they broke loading of status bar face graphics belonging to skins. SBARINFO update #15 diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 22e5976cd..9da7f3dc2 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1270,8 +1270,9 @@ bool AActor::OkayToSwitchTarget (AActor *other) } int infight; - if (level.flags & LEVEL_TOTALINFIGHTING) infight=1; - else if (level.flags & LEVEL_NOINFIGHTING) infight=-1; + if (flags5 & MF5_NOINFIGHTING) infight=-1; + else if (level.flags & LEVEL_TOTALINFIGHTING) infight=1; + else if (level.flags & LEVEL_NOINFIGHTING) infight=-1; else infight = infighting; if (infight < 0 && other->player == NULL && !IsHostile (other)) diff --git a/src/p_map.cpp b/src/p_map.cpp index 24970f909..3b571c477 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2877,8 +2877,24 @@ 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) - { - SpawnShootDecal (t1, trace); + { + // [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); + } + + // Else, look if the bulletpuff has a decal defined. + else if(puff != NULL && puff->DecalGenerator) + { + SpawnShootDecal (puff, trace); + } + + else + { + SpawnShootDecal (t1, trace); + } } else if (puff != NULL && trace.CrossedWater == NULL &&