Add opfor decals

This commit is contained in:
Roman Chistokhodov 2019-08-08 09:44:37 +03:00
parent 6f4dbd2484
commit 61fed5c8b4
4 changed files with 19 additions and 9 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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 }
};
/*