From 88098ab5d3b1a8e3209b190e78664c4020641bc8 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Sat, 26 Nov 2005 23:23:03 +0000 Subject: [PATCH] r_rockettrail/r_grenadetrail 0 disables both cvars marked as semicheats switched faithful for highfps in presets.. need a faithful preset probably git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1596 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_ents.c | 18 ++++++++++++++---- engine/client/m_options.c | 2 +- engine/client/r_part.c | 9 ++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index 1d10a76c5..8011794eb 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -1728,14 +1728,19 @@ void CL_LinkPacketEntities (void) } for (i=0 ; i<3 ; i++) + { if ( abs(old_origin[i] - ent->origin[i]) > 128) { // no trail if too far VectorCopy (ent->origin, old_origin); break; } + } - if (P_ParticleTrail (old_origin, ent->origin, model->particletrail, &(le->trailstate))) - P_ParticleTrailIndex(old_origin, ent->origin, model->traildefaultindex, 0, &(le->trailstate)); + if (model->particletrail >= 0) + { + if (P_ParticleTrail (old_origin, ent->origin, model->particletrail, &(le->trailstate))) + P_ParticleTrailIndex(old_origin, ent->origin, model->traildefaultindex, 0, &(le->trailstate)); + } { extern cvar_t gl_part_flame; @@ -2029,14 +2034,19 @@ void CL_LinkPacketEntities (void) } for (i=0 ; i<3 ; i++) + { if ( abs(old_origin[i] - ent->origin[i]) > 128) { // no trail if too far VectorCopy (ent->origin, old_origin); break; } + } - if (P_ParticleTrail (old_origin, ent->origin, model->particletrail, &cl.lerpents[s1->number].trailstate)) - P_ParticleTrailIndex(old_origin, ent->origin, model->traildefaultindex, 0, &cl.lerpents[s1->number].trailstate); + if (model->particletrail >= 0) + { + if (P_ParticleTrail (old_origin, ent->origin, model->particletrail, &cl.lerpents[s1->number].trailstate)) + P_ParticleTrailIndex(old_origin, ent->origin, model->traildefaultindex, 0, &cl.lerpents[s1->number].trailstate); + } { extern cvar_t gl_part_flame; diff --git a/engine/client/m_options.c b/engine/client/m_options.c index 3350103bc..eff1bb6cc 100644 --- a/engine/client/m_options.c +++ b/engine/client/m_options.c @@ -365,7 +365,7 @@ typedef struct { presetinfo_t preset[] = { {"r_presetname", {"286", "fast", "default", "nice", "realtime"}}, - {"r_particlesdesc", {"none", "faithful", "spikeset", "spikeset", "spikeset"}}, + {"r_particlesdesc", {"none", "highfps", "spikeset", "spikeset", "spikeset"}}, {"r_stains", {"0", "0", "1", "1", "1"}}, {"r_drawflat", {"1", "0", "0", "0", "0"}}, {"r_nolerp", {"1", "1", "0", "0", "0"}}, diff --git a/engine/client/r_part.c b/engine/client/r_part.c index af49166c3..894d1d234 100644 --- a/engine/client/r_part.c +++ b/engine/client/r_part.c @@ -126,8 +126,8 @@ cvar_t r_particlesdesc = {"r_particlesdesc", "spikeset", NULL, CVAR_LATCH|CVAR_S cvar_t r_part_rain_quantity = {"r_part_rain_quantity", "1"}; -cvar_t r_rockettrail = {"r_rockettrail", "1"}; -cvar_t r_grenadetrail = {"r_grenadetrail", "1"}; +cvar_t r_rockettrail = {"r_rockettrail", "1", NULL, CVAR_SEMICHEAT}; +cvar_t r_grenadetrail = {"r_grenadetrail", "1", NULL, CVAR_SEMICHEAT}; cvar_t r_particle_tracelimit = {"r_particle_tracelimit", "250"}; cvar_t r_part_sparks = {"r_part_sparks", "1"}; @@ -1038,7 +1038,7 @@ void P_SelectableTrail(model_t *model, cvar_t *selection, int mdleffect, int mdl switch (select) { - case 0: // check for string + case 0: // check for string, otherwise no trail { int effect = P_FindParticleType(selection->string); @@ -1049,6 +1049,9 @@ void P_SelectableTrail(model_t *model, cvar_t *selection, int mdleffect, int mdl break; } } + + model->particletrail = -1; + break; case 1: // default model effect default: model->particletrail = mdleffect;