From 61fed5c8b42970a8e2e958af5814d6877c956b47 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Thu, 8 Aug 2019 09:44:37 +0300 Subject: [PATCH] Add opfor decals --- dlls/decals.h | 11 ++++++++++- dlls/gearbox/shock.cpp | 4 ---- dlls/gearbox/sporegrenade.cpp | 4 ---- dlls/world.cpp | 9 +++++++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/dlls/decals.h b/dlls/decals.h index 5de54421..2350aa72 100644 --- a/dlls/decals.h +++ b/dlls/decals.h @@ -62,7 +62,16 @@ enum decal_e DECAL_SMALLSCORCH2, // Small scorch mark DECAL_SMALLSCORCH3, // Small scorch mark DECAL_MOMMABIRTH, // Big momma birth splatter - DECAL_MOMMASPLAT + DECAL_MOMMASPLAT, + DECAL_SPR_SPLT1, + DECAL_SPR_SPLT2, + DECAL_SPR_SPLT3, + DECAL_OPFOR_SCORCH1, + DECAL_OPFOR_SCORCH2, + DECAL_OPFOR_SCORCH3, + DECAL_OPFOR_SMALLSCORCH1, + DECAL_OPFOR_SMALLSCORCH2, + DECAL_OPFOR_SMALLSCORCH3, }; typedef struct diff --git a/dlls/gearbox/shock.cpp b/dlls/gearbox/shock.cpp index 1a8830bb..c1ccd473 100644 --- a/dlls/gearbox/shock.cpp +++ b/dlls/gearbox/shock.cpp @@ -132,11 +132,7 @@ void CShock::Touch(CBaseEntity *pOther) if (!pOther->pev->takedamage) { // make a splat on the wall -#if FEATURE_OPFOR_DECALS const int baseDecal = DECAL_OPFOR_SCORCH1; -#else - const int baseDecal = DECAL_SMALLSCORCH1; -#endif UTIL_DecalTrace(&tr, baseDecal + RANDOM_LONG(0, 2)); int iContents = UTIL_PointContents(pev->origin); diff --git a/dlls/gearbox/sporegrenade.cpp b/dlls/gearbox/sporegrenade.cpp index 67cc81a8..1dd89aee 100644 --- a/dlls/gearbox/sporegrenade.cpp +++ b/dlls/gearbox/sporegrenade.cpp @@ -119,11 +119,7 @@ void CSporeGrenade::Explode(TraceResult *pTrace) RadiusDamage(pev, pevOwner, pev->dmg, CLASS_NONE, DMG_BLAST); // Place a decal on the surface that was hit. -#if FEATURE_OPFOR_DECALS UTIL_DecalTrace(pTrace, DECAL_SPR_SPLT1 + RANDOM_LONG(0, 2)); -#else - UTIL_DecalTrace(pTrace, DECAL_YBLOOD5 + RANDOM_LONG(0, 1)); -#endif UTIL_Remove(this); } diff --git a/dlls/world.cpp b/dlls/world.cpp index ae5a41bc..32d0467a 100644 --- a/dlls/world.cpp +++ b/dlls/world.cpp @@ -91,6 +91,15 @@ DLL_DECALLIST gDecals[] = { { "{smscorch3", 0 }, // DECAL_SMALLSCORCH3, // Small scorch mark { "{mommablob", 0 }, // DECAL_MOMMABIRTH // BM Birth spray { "{mommablob", 0 }, // DECAL_MOMMASPLAT // BM Mortar spray?? need decal + { "{spr_splt1", 0 }, + { "{spr_splt2", 0 }, + { "{spr_splt3", 0 }, + { "{ofscorch1", 0 }, + { "{ofscorch2", 0 }, + { "{ofscorch3", 0 }, + { "{ofsmscorch1", 0 }, + { "{ofsmscorch2", 0 }, + { "{ofsmscorch3", 0 } }; /*