Browse Source

Add opfor decals

opforfixed
Roman Chistokhodov 5 years ago
parent
commit
61fed5c8b4
  1. 11
      dlls/decals.h
  2. 4
      dlls/gearbox/shock.cpp
  3. 4
      dlls/gearbox/sporegrenade.cpp
  4. 9
      dlls/world.cpp

11
dlls/decals.h

@ -62,7 +62,16 @@ enum decal_e @@ -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

4
dlls/gearbox/shock.cpp

@ -132,11 +132,7 @@ void CShock::Touch(CBaseEntity *pOther) @@ -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);

4
dlls/gearbox/sporegrenade.cpp

@ -119,11 +119,7 @@ void CSporeGrenade::Explode(TraceResult *pTrace) @@ -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);
}

9
dlls/world.cpp

@ -91,6 +91,15 @@ DLL_DECALLIST gDecals[] = { @@ -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 }
};
/*

Loading…
Cancel
Save