diff --git a/src/gamedata/decallib.cpp b/src/gamedata/decallib.cpp index 0f6e656b5f..609a876873 100644 --- a/src/gamedata/decallib.cpp +++ b/src/gamedata/decallib.cpp @@ -175,7 +175,8 @@ static const char *DecalKeywords[] = "colors", "animator", "lowerdecal", - "opaqueblood", + "opaqueblood", // Deprecated - use translatable instead! + "translatable", NULL }; @@ -198,6 +199,7 @@ enum DECAL_ANIMATOR, DECAL_LOWERDECAL, DECAL_OPAQUEBLOOD, + DECAL_TRANSLATABLE, }; const FDecalTemplate *FDecalBase::GetDecal () const @@ -483,8 +485,9 @@ void FDecalLib::ParseDecal (FScanner &sc) break; case DECAL_OPAQUEBLOOD: + case DECAL_TRANSLATABLE: newdecal.RenderStyle = STYLE_Normal; - newdecal.opaqueBlood = true; + newdecal.translatable = true; break; } } diff --git a/src/gamedata/decallib.h b/src/gamedata/decallib.h index ac07b252f1..9bb3b9ce57 100644 --- a/src/gamedata/decallib.h +++ b/src/gamedata/decallib.h @@ -81,7 +81,7 @@ public: FRenderStyle RenderStyle; FTextureID PicNum; uint16_t RenderFlags; - bool opaqueBlood; + bool translatable; double Alpha; // same as actor->alpha const FDecalAnimator *Animator; const FDecalBase *LowerDecal; diff --git a/src/playsim/a_decals.cpp b/src/playsim/a_decals.cpp index 870886853e..0729c49885 100644 --- a/src/playsim/a_decals.cpp +++ b/src/playsim/a_decals.cpp @@ -754,8 +754,8 @@ DBaseDecal* DImpactDecal::StaticCreate (FLevelLocals *Level, const FDecalTemplat decal->SetShade (color.r, color.g, color.b); } - // [Nash] opaque blood - if (translation != NO_TRANSLATION && tpl->ShadeColor == 0 && tpl->opaqueBlood) + // [Nash] Translatable opaque decal. Note that the decal must be unshaded for this to work. + if (translation != NO_TRANSLATION && tpl->ShadeColor == 0 && tpl->translatable) { decal->SetTranslation(translation); decal->RenderStyle = STYLE_Normal; @@ -794,8 +794,8 @@ DBaseDecal *DImpactDecal::CloneSelf (const FDecalTemplate *tpl, double ix, doubl tpl->ApplyToDecal (decal, wall); decal->AlphaColor = AlphaColor; - // [Nash] opaque blood - if (tpl->ShadeColor == 0 && tpl->opaqueBlood) + // [Nash] Translatable opaque decal + if (tpl->ShadeColor == 0 && tpl->translatable) { decal->SetTranslation(Translation); decal->RenderStyle = STYLE_Normal;