Exterminate FX_Explosion, FX_Spark and FX_Impact references.
This commit is contained in:
parent
159756889f
commit
bd470605a3
18 changed files with 63 additions and 36 deletions
|
@ -39,7 +39,7 @@ CMD_dev_explode(void)
|
|||
{
|
||||
makevectors(getproperty(VF_ANGLES));
|
||||
traceline(getproperty(VF_ORIGIN), getproperty(VF_ORIGIN) + v_forward * 4096, FALSE, pSeat->m_ePlayer);
|
||||
FX_Explosion(trace_endpos);
|
||||
// FX_Explosion(trace_endpos);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -121,6 +121,7 @@ CMD_way_menu(void)
|
|||
static void
|
||||
CMD_view_geomtest(void)
|
||||
{
|
||||
print(sprintf("geomset %s %s\n", argv(1), argv(2)));
|
||||
Weapons_SetGeomset(sprintf("geomset %s %s\n", argv(1), argv(2)));
|
||||
}
|
||||
|
||||
|
|
|
@ -14,5 +14,3 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void FX_Spark(vector, vector);
|
||||
void FX_BreakModel(int, vector, vector, vector, float);
|
||||
|
|
|
@ -120,7 +120,7 @@ env_explosion::Respawn(void)
|
|||
void
|
||||
env_explosion::Trigger(entity act, triggermode_t state)
|
||||
{
|
||||
FX_Explosion(origin);
|
||||
pointparticles(particleeffectnum("fx_explosion.main"), origin, [0,0,0], 1);
|
||||
|
||||
if (!HasSpawnFlags(ENVEXPLO_NODAMAGE)) {
|
||||
Damage_Radius(origin, this, m_iMagnitude, m_iMagnitude * 2.5f, TRUE, 0);
|
||||
|
|
|
@ -151,7 +151,7 @@ void
|
|||
env_spark::CreateSpark(void)
|
||||
{
|
||||
Sound_Play(this, CHAN_AUTO, "env_spark.sfx");
|
||||
FX_Spark(self.origin, self.angles);
|
||||
pointparticles(particleeffectnum("platform.spark"), origin, angles, 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -299,7 +299,7 @@ func_breakable::Explode(void)
|
|||
string breakModel = GetPropData(PROPINFO_BREAKMODEL);
|
||||
|
||||
BreakModel_Spawn(absmin, absmax, [0,0,0], m_flExplodeMag, vlen(size) / 10, breakModel);
|
||||
FX_Explosion(rp);
|
||||
pointparticles(particleeffectnum("fx_explosion.main"), rp, [0,0,0], 1);
|
||||
Damage_Radius(rp, this, m_flExplodeMag, m_flExplodeRad, TRUE, 0);
|
||||
UseTargets(this, TRIG_TOGGLE, 0.0f); /* delay... ignored. */
|
||||
SetTakedamage(DAMAGE_NO);
|
||||
|
|
|
@ -156,7 +156,7 @@ func_mortar_field::Fire(vector vecOrg)
|
|||
|
||||
float dmg = 200.0f;
|
||||
Damage_Radius(trace_endpos, this, dmg, dmg * 2.5f, TRUE, 0);
|
||||
FX_Explosion(trace_endpos);
|
||||
pointparticles(particleeffectnum("fx_explosion.main"), trace_endpos, [0,0,0], 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -291,8 +291,6 @@ env_laser::ReceiveEntity(float flNew, float flChanged)
|
|||
|
||||
#define LASER_COUNT 16
|
||||
|
||||
void FX_Spark(vector pos, vector ang);
|
||||
|
||||
static float env_laser_jitlut[LASER_COUNT] = {
|
||||
0.000000,
|
||||
0.195090,
|
||||
|
@ -389,14 +387,14 @@ env_laser::predraw(void)
|
|||
if (m_iBeamFlags & (LASER_STARTSPARKS)) {
|
||||
vector dir = vectoangles(origin - m_vecEndPos);
|
||||
makevectors(dir);
|
||||
FX_Spark(origin, -v_forward);
|
||||
pointparticles(particleeffectnum("platform.spark"), origin, -v_forward, 1);
|
||||
}
|
||||
|
||||
if (m_iBeamFlags & (LASER_ENDSPARKS)) {
|
||||
vector dir2 = vectoangles(m_vecEndPos - origin);
|
||||
|
||||
makevectors(dir2);
|
||||
FX_Spark(m_vecEndPos, -v_forward);
|
||||
pointparticles(particleeffectnum("platform.spark"), m_vecEndPos, -v_forward, 1);
|
||||
}
|
||||
|
||||
m_flSparkTime = time + 0.25f;
|
||||
|
|
|
@ -352,7 +352,7 @@ func_tankmortar::PlayerInput(void)
|
|||
Damage_Radius(trace_endpos, m_eDriver, dmg, dmg * 2.5f, TRUE, 0);
|
||||
|
||||
/* fx */
|
||||
FX_Explosion(trace_endpos);
|
||||
pointparticles(particleeffectnum("fx_explosion.main"), trace_endpos, [0,0,0], 1);
|
||||
SpriteSmoke(spos);
|
||||
SpriteFlash(spos);
|
||||
|
||||
|
|
|
@ -170,13 +170,13 @@ NSTraceAttack::_FireSingle(vector vecPos, vector vecAngles, float flDamage, floa
|
|||
|
||||
/* water impact */
|
||||
if (trace_endcontentsi & CONTENTBIT_WATER) {
|
||||
FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal);
|
||||
SurfData_ImpactOfNamedType("water", trace_endpos, trace_plane_normal);
|
||||
_FireSingle(trace_endpos + (v_forward * 2), vecAngles, flDamage / 2, flRange);
|
||||
} else if (trace_endcontentsi & CONTENTBIT_SLIME) {
|
||||
FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal);
|
||||
SurfData_ImpactOfNamedType("slime", trace_endpos, trace_plane_normal);
|
||||
_FireSingle(trace_endpos + (v_forward * 2), vecAngles, flDamage / 2, flRange);
|
||||
} else if (trace_endcontentsi & CONTENTBIT_LAVA) {
|
||||
FX_Impact(IMPACT_SLOSH, trace_endpos, trace_plane_normal);
|
||||
SurfData_ImpactOfNamedType("lama", trace_endpos, trace_plane_normal);
|
||||
_FireSingle(trace_endpos + (v_forward * 2), vecAngles, flDamage / 2, flRange);
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ NSTraceAttack::_FireSingle(vector vecPos, vector vecAngles, float flDamage, floa
|
|||
if (m_strDecalGroup)
|
||||
DecalGroups_Place(m_strDecalGroup, trace_endpos + (v_forward * -2));
|
||||
|
||||
SurfData_Impact(trace_ent, trace_surfaceflagsi, trace_endpos, trace_plane_normal);
|
||||
SurfData_Impact(trace_ent, trace_endpos, trace_plane_normal);
|
||||
}
|
||||
|
||||
/* combine them into one single Damage_Apply call later */
|
||||
|
|
|
@ -86,8 +86,6 @@ var bool g_isloading = false;
|
|||
|
||||
var bool autocvar_mp_flashlight = true;
|
||||
|
||||
void FX_Impact(impactType_t, vector, vector);
|
||||
void FX_Explosion(vector);
|
||||
|
||||
void TraceAttack_FireBullets(int, vector, int, vector, int);
|
||||
#ifdef BULLETPENETRATION
|
||||
|
|
|
@ -463,8 +463,12 @@ EntityDef_Precaches(int index)
|
|||
|
||||
if (substring(strKey, 0, 4) == "snd_") {
|
||||
Sound_Precache(strValue);
|
||||
spawnWords = tokenize_console(g_entDefTable[index].spawnData);
|
||||
} else if (substring(strKey, 0, 6) == "smoke_") {
|
||||
particleeffectnum(strValue);
|
||||
} else if (strKey == "model_detonate") {
|
||||
particleeffectnum(strValue);
|
||||
}
|
||||
spawnWords = tokenize_console(g_entDefTable[index].spawnData);
|
||||
}
|
||||
|
||||
/* handle soundDef events */
|
||||
|
|
|
@ -146,8 +146,7 @@ private:
|
|||
int a_ammo2;
|
||||
int a_ammo3;
|
||||
|
||||
/* any mods that use hooks */
|
||||
entity hook;
|
||||
PREDICTED_VECTOR(grapvelocity)
|
||||
|
||||
#ifdef CLIENT
|
||||
int sequence;
|
||||
|
|
|
@ -524,6 +524,9 @@ NSClientPlayer::ReceiveEntity(float new, float flChanged)
|
|||
READENTITY_COORD(basevelocity[0], PLAYER_VELOCITY)
|
||||
READENTITY_COORD(basevelocity[1], PLAYER_VELOCITY)
|
||||
READENTITY_COORD(basevelocity[2], PLAYER_VELOCITY)
|
||||
READENTITY_COORD(grapvelocity[0], PLAYER_VELOCITY)
|
||||
READENTITY_COORD(grapvelocity[1], PLAYER_VELOCITY)
|
||||
READENTITY_COORD(grapvelocity[2], PLAYER_VELOCITY)
|
||||
READENTITY_INT(flags, PLAYER_FLAGS)
|
||||
READENTITY_INT(gflags, PLAYER_FLAGS)
|
||||
READENTITY_INT(pmove_flags, PLAYER_FLAGS)
|
||||
|
@ -582,6 +585,7 @@ NSClientPlayer::PredictPreFrame(void)
|
|||
SAVE_STATE(colormap)
|
||||
SAVE_STATE(velocity)
|
||||
SAVE_STATE(basevelocity)
|
||||
SAVE_STATE(grapvelocity)
|
||||
SAVE_STATE(flags)
|
||||
SAVE_STATE(gflags)
|
||||
SAVE_STATE(pmove_flags)
|
||||
|
@ -627,6 +631,7 @@ NSClientPlayer::PredictPostFrame(void)
|
|||
ROLL_BACK(colormap)
|
||||
ROLL_BACK(velocity)
|
||||
ROLL_BACK(basevelocity)
|
||||
ROLL_BACK(grapvelocity)
|
||||
ROLL_BACK(flags)
|
||||
ROLL_BACK(gflags)
|
||||
ROLL_BACK(pmove_flags)
|
||||
|
@ -928,6 +933,9 @@ NSClientPlayer::EvaluateEntity(void)
|
|||
EVALUATE_VECTOR(basevelocity, 0, PLAYER_VELOCITY)
|
||||
EVALUATE_VECTOR(basevelocity, 1, PLAYER_VELOCITY)
|
||||
EVALUATE_VECTOR(basevelocity, 2, PLAYER_VELOCITY)
|
||||
EVALUATE_VECTOR(grapvelocity, 0, PLAYER_VELOCITY)
|
||||
EVALUATE_VECTOR(grapvelocity, 1, PLAYER_VELOCITY)
|
||||
EVALUATE_VECTOR(grapvelocity, 2, PLAYER_VELOCITY)
|
||||
EVALUATE_FIELD(flags, PLAYER_FLAGS)
|
||||
EVALUATE_FIELD(gflags, PLAYER_FLAGS)
|
||||
EVALUATE_FIELD(pmove_flags, PLAYER_FLAGS)
|
||||
|
@ -997,6 +1005,9 @@ NSClientPlayer::SendEntity(entity ePEnt, float flChanged)
|
|||
SENDENTITY_COORD(basevelocity[0], PLAYER_VELOCITY)
|
||||
SENDENTITY_COORD(basevelocity[1], PLAYER_VELOCITY)
|
||||
SENDENTITY_COORD(basevelocity[2], PLAYER_VELOCITY)
|
||||
SENDENTITY_COORD(grapvelocity[0], PLAYER_VELOCITY)
|
||||
SENDENTITY_COORD(grapvelocity[1], PLAYER_VELOCITY)
|
||||
SENDENTITY_COORD(grapvelocity[2], PLAYER_VELOCITY)
|
||||
SENDENTITY_INT(flags, PLAYER_FLAGS)
|
||||
SENDENTITY_INT(gflags, PLAYER_FLAGS)
|
||||
SENDENTITY_INT(pmove_flags, PLAYER_FLAGS)
|
||||
|
|
|
@ -1629,7 +1629,7 @@ NSMonster::SpawnKey(string strKey, string strValue)
|
|||
m_strTriggerTarget = ReadString(strValue);
|
||||
break;
|
||||
/* entityDef related */
|
||||
case "netname": /* used for obituries and debug info */
|
||||
case "netname": /* used for obituaries and debug info */
|
||||
netname = ReadString(strValue);
|
||||
break;
|
||||
case "eye_height":
|
||||
|
|
|
@ -686,7 +686,7 @@ NSSurfacePropEntity::Death(void)
|
|||
if (!flExplodeRad)
|
||||
flExplodeRad = flExplodeMag * 2.5f;
|
||||
|
||||
FX_Explosion(origin);
|
||||
pointparticles(particleeffectnum("fx_explosion.main"), origin, angles, 1);
|
||||
Damage_Radius(origin, this, flExplodeMag, flExplodeRad, TRUE, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -396,13 +396,11 @@ NSClientPlayer::Physics_Run(void)
|
|||
/* handle drowning and other environmental factors */
|
||||
Physics_WaterMove();
|
||||
|
||||
/* grappling hook stuff */
|
||||
#if 0
|
||||
if (pl.hook.skin == 1) {
|
||||
pl.velocity = (pl.hook.origin - pl.origin);
|
||||
pl.velocity = (pl.velocity * (1 / (vlen(pl.velocity) / 750)));
|
||||
/* grappling hook stuff, TODO: variable speeds */
|
||||
if (grapvelocity != g_vec_null) {
|
||||
velocity = (grapvelocity - origin);
|
||||
velocity = (velocity * (1 / (vlen(velocity) / 750)));
|
||||
}
|
||||
#endif
|
||||
|
||||
Physics_SetViewParms();
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ int SurfData_Finish(void);
|
|||
int SurfData_TexToSurfData(string tex_name);
|
||||
|
||||
/* Call an impact effect against an entity surface */
|
||||
void SurfData_Impact(entity e, int fl, vector org, vector ang);
|
||||
void SurfData_Impact(entity e, vector org, vector ang);
|
||||
|
||||
/* Get information from a Surface */
|
||||
__variant SurfData_GetInfo(int, int);
|
||||
|
@ -140,4 +140,8 @@ __variant SurfData_GetInfo(int, int);
|
|||
#ifdef CLIENT
|
||||
void SurfData_Impact_Parse(void);
|
||||
void SurfData_ImpactID_Parse(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void SurfData_ImpactOfType(int materialID, vector worldPosition, vector impactNormal);
|
||||
|
||||
void SurfData_ImpactOfNamedType(string materialName, vector worldPosition, vector impactNormal);
|
|
@ -445,10 +445,10 @@ SurfData_ImpactID_Parse(void)
|
|||
#endif
|
||||
|
||||
void
|
||||
SurfData_Impact(entity e, int fl, vector org, vector ang)
|
||||
SurfData_Impact(entity e, vector org, vector ang)
|
||||
{
|
||||
#ifdef SERVER
|
||||
static void SurfData_Impact_SurfaceParm(entity e, int fl, vector org, vector ang) {
|
||||
static void SurfData_Impact_SurfaceParm(entity e, vector org, vector ang) {
|
||||
SurfData_Impact_Net(e, org);
|
||||
}
|
||||
|
||||
|
@ -460,14 +460,30 @@ SurfData_Impact(entity e, int fl, vector org, vector ang)
|
|||
NSLog("SurfData_Impact: %S %i\n", n, texdata);
|
||||
SurfData_ImpactID_Net(texdata, org, ang);
|
||||
} else
|
||||
SurfData_Impact_SurfaceParm(e, fl, org, ang);
|
||||
SurfData_Impact_SurfaceParm(e, org, ang);
|
||||
} else { /* anything with takedamage = DAMAGE_YES is a NSurfacePropEntity. */
|
||||
NSSurfacePropEntity foo = (NSSurfacePropEntity)e;
|
||||
|
||||
if (foo.HasSurfaceData() && foo.GetSurfaceData(SURFDATA_MATERIAL) != -1)
|
||||
FX_Impact(foo.GetSurfaceData(SURFDATA_FX_BULLETIMPACT), org, ang);
|
||||
SurfData_ImpactOfType(foo.GetSurfaceData(SURFDATA_MATERIAL), org, ang);
|
||||
else
|
||||
SurfData_Impact_SurfaceParm(e, fl, org, ang);
|
||||
SurfData_Impact_SurfaceParm(e, org, ang);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
SurfData_ImpactOfType(int materialID, vector worldPosition, vector impactNormal)
|
||||
{
|
||||
#ifdef SERVER
|
||||
SurfData_ImpactID_Net(materialID, worldPosition, impactNormal);
|
||||
#endif
|
||||
/* TODO: client side only version */
|
||||
}
|
||||
|
||||
void
|
||||
SurfData_ImpactOfNamedType(string materialName, vector worldPosition, vector impactNormal)
|
||||
{
|
||||
int index = (int)hash_get(g_hashsurfdata, materialName, -1);
|
||||
SurfData_ImpactOfType(index, worldPosition, impactNormal);
|
||||
}
|
Loading…
Reference in a new issue