NSProjectile: add spawn key "decal_detonate" which can spawn a DecalGroup definition upon detonation.
This commit is contained in:
parent
35b427b84d
commit
571ef536a1
2 changed files with 10 additions and 5 deletions
|
@ -59,9 +59,9 @@ private:
|
|||
string m_defDamage;
|
||||
string m_defSplashDamage;
|
||||
vector m_vecLaunchVelocity;
|
||||
float m_flThrust; /* TODO */
|
||||
float m_flThrustStart; /* TODO */
|
||||
float m_flThrustEnd; /* TODO */
|
||||
float m_flThrust;
|
||||
float m_flThrustStart;
|
||||
float m_flThrustEnd;
|
||||
float m_flFrictionLinear; /* TODO */
|
||||
float m_flBounce;
|
||||
float m_flMass; /* TODO */
|
||||
|
@ -73,8 +73,8 @@ private:
|
|||
bool m_bDetonateOnActor;
|
||||
bool m_bImpactEffect; /* TODO */
|
||||
bool m_bImpactGib; /* TODO */
|
||||
string m_matDetonate; /* TODO */
|
||||
float m_flDecalSize; /* TODO */
|
||||
string m_matDetonate;
|
||||
float m_flDecalSize;
|
||||
string m_partSmokeFly;
|
||||
string m_partModelDetonate;
|
||||
string m_partSmokeDetonate;
|
||||
|
|
|
@ -142,6 +142,7 @@ NSProjectile::SpawnKey(string strKey, string strValue)
|
|||
case "impact_gib": /* gibs */
|
||||
m_bImpactGib = ReadBool(strValue);
|
||||
break;
|
||||
case "decal_detonate":
|
||||
case "mtr_detonate":
|
||||
m_matDetonate = ReadString(strValue);
|
||||
break;
|
||||
|
@ -597,6 +598,10 @@ NSProjectile::_Explode(void)
|
|||
makevectors(vectoangles(velocity));
|
||||
vector explodePos = origin - (v_forward * 32);
|
||||
|
||||
if (m_matDetonate) {
|
||||
DecalGroups_Place(m_matDetonate, origin);
|
||||
}
|
||||
|
||||
if (m_partModelDetonate)
|
||||
pointparticles(particleeffectnum(m_partModelDetonate), explodePos, trace_plane_normal, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue