2004-08-23 00:15:46 +00:00
|
|
|
#include "quakedef.h"
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
#define NUMVERTEXNORMALS 162
|
|
|
|
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
|
|
|
|
#include "anorms.h"
|
|
|
|
};
|
2005-10-10 01:16:58 +00:00
|
|
|
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
void R_Rockettrail_Callback(struct cvar_s *var, char *oldvalue)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
model_t *mod;
|
|
|
|
extern model_t mod_known[];
|
|
|
|
extern int mod_numknown;
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (cls.state == ca_disconnected)
|
|
|
|
return; // don't bother parsing while disconnected
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
|
|
|
|
{
|
|
|
|
if (mod->flags & EF_ROCKET)
|
|
|
|
P_DefaultTrail(mod);
|
|
|
|
}
|
|
|
|
}
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
void R_Grenadetrail_Callback(struct cvar_s *var, char *oldvalue)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
model_t *mod;
|
|
|
|
extern model_t mod_known[];
|
|
|
|
extern int mod_numknown;
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (cls.state == ca_disconnected)
|
|
|
|
return; // don't bother parsing while disconnected
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
for (i=0 , mod=mod_known ; i<mod_numknown ; i++, mod++)
|
|
|
|
{
|
|
|
|
if (mod->flags & EF_GRENADE)
|
|
|
|
P_DefaultTrail(mod);
|
|
|
|
}
|
|
|
|
}
|
2005-03-10 03:55:18 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
particleengine_t pe_null;
|
|
|
|
particleengine_t pe_classic;
|
|
|
|
particleengine_t pe_darkplaces;
|
|
|
|
particleengine_t pe_script;
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
particleengine_t *particlesystem[] =
|
|
|
|
{
|
|
|
|
&pe_script,
|
|
|
|
&pe_darkplaces,
|
|
|
|
&pe_classic,
|
|
|
|
&pe_null,
|
|
|
|
{NULL},
|
|
|
|
};
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
void R_ParticleSystem_Callback(struct cvar_s *var, char *oldvalue)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
if (pe)
|
|
|
|
pe->ShutdownParticles();
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
pe = NULL;
|
2004-10-15 00:00:15 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
for (i = 0; particlesystem[i]; i++)
|
|
|
|
{
|
|
|
|
if ( (particlesystem[i]->name1 && !stricmp(var->string, particlesystem[i]->name1))
|
|
|
|
|| (particlesystem[i]->name2 && !stricmp(var->string, particlesystem[i]->name2)))
|
|
|
|
{
|
|
|
|
pe = particlesystem[i];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (!pe)
|
|
|
|
if (particlesystem[i]->name1)
|
|
|
|
pe = particlesystem[i];
|
|
|
|
}
|
2005-05-13 10:42:48 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (!pe)
|
|
|
|
Sys_Error("No particle system available. Please recompile.");
|
2005-05-30 04:34:47 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
pe->InitParticles();
|
|
|
|
pe->ClearParticles();
|
|
|
|
CL_RegisterParticles();
|
|
|
|
}
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
cvar_t r_rockettrail = SCVARFC("r_rockettrail", "1", CVAR_SEMICHEAT, R_Rockettrail_Callback);
|
|
|
|
cvar_t r_grenadetrail = SCVARFC("r_grenadetrail", "1", CVAR_SEMICHEAT, R_Grenadetrail_Callback);
|
2009-07-14 23:42:54 +00:00
|
|
|
#ifdef MINIMAL
|
|
|
|
//minimal builds get a different default.
|
|
|
|
cvar_t r_particlesystem = SCVARFC("r_particlesystem", "classic", CVAR_SEMICHEAT, R_ParticleSystem_Callback);
|
|
|
|
#else
|
2008-11-09 22:29:28 +00:00
|
|
|
cvar_t r_particlesystem = SCVARFC("r_particlesystem", "script", CVAR_SEMICHEAT, R_ParticleSystem_Callback);
|
2009-07-14 23:42:54 +00:00
|
|
|
#endif
|
2008-11-09 22:29:28 +00:00
|
|
|
cvar_t r_particlesdesc = SCVARF("r_particlesdesc", "spikeset tsshaft", CVAR_SEMICHEAT);
|
2004-08-23 00:15:46 +00:00
|
|
|
extern cvar_t r_bouncysparks;
|
|
|
|
extern cvar_t r_part_rain;
|
|
|
|
extern cvar_t r_bloodstains;
|
2005-10-09 01:36:42 +00:00
|
|
|
extern cvar_t gl_part_flame;
|
2006-02-11 02:09:43 +00:00
|
|
|
cvar_t r_part_rain_quantity = SCVAR("r_part_rain_quantity", "1");
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2006-02-11 02:09:43 +00:00
|
|
|
cvar_t r_particle_tracelimit = SCVAR("r_particle_tracelimit", "250");
|
|
|
|
cvar_t r_part_sparks = SCVAR("r_part_sparks", "1");
|
|
|
|
cvar_t r_part_sparks_trifan = SCVAR("r_part_sparks_trifan", "1");
|
|
|
|
cvar_t r_part_sparks_textured = SCVAR("r_part_sparks_textured", "1");
|
|
|
|
cvar_t r_part_beams = SCVAR("r_part_beams", "1");
|
|
|
|
cvar_t r_part_beams_textured = SCVAR("r_part_beams_textured", "1");
|
|
|
|
cvar_t r_part_contentswitch = SCVAR("r_part_contentswitch", "1");
|
2004-09-07 18:21:08 +00:00
|
|
|
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
particleengine_t *pe;
|
2005-09-08 22:52:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
void P_InitParticleSystem(void)
|
|
|
|
{
|
|
|
|
char *particlecvargroupname = "Particle effects";
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
Cvar_Register(&r_particlesystem, "Particles");
|
2004-08-23 00:15:46 +00:00
|
|
|
|
|
|
|
|
2006-09-17 00:59:22 +00:00
|
|
|
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
//particles
|
|
|
|
Cvar_Register(&r_particlesdesc, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_bouncysparks, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_rain, particlecvargroupname);
|
2006-09-17 00:59:22 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
Cvar_Register(&r_part_rain_quantity, particlecvargroupname);
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
Cvar_Register(&r_particle_tracelimit, particlecvargroupname);
|
|
|
|
|
|
|
|
Cvar_Register(&r_part_sparks, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_sparks_trifan, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_sparks_textured, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_beams, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_beams_textured, particlecvargroupname);
|
|
|
|
Cvar_Register(&r_part_contentswitch, particlecvargroupname);
|
|
|
|
|
|
|
|
Cvar_Register (&gl_part_flame, particlecvargroupname);
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
#ifdef Q2BSPS
|
|
|
|
qboolean Q2TraceLineN (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
vec3_t nul = {0,0,0};
|
|
|
|
trace_t trace = CM_BoxTrace(pmove.physents[0].model, start, end, nul, nul, MASK_SOLID);
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (trace.fraction < 1)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
VectorCopy (trace.plane.normal, normal);
|
|
|
|
VectorCopy (trace.endpos, impact);
|
|
|
|
return true;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
return false;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
#endif
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
qboolean TraceLineN (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
trace_t trace;
|
|
|
|
float len, bestlen;
|
2004-08-23 00:15:46 +00:00
|
|
|
int i;
|
2008-11-09 22:29:28 +00:00
|
|
|
vec3_t delta, ts, te;
|
|
|
|
physent_t *pe;
|
|
|
|
qboolean clipped=false;
|
|
|
|
|
|
|
|
memset (&trace, 0, sizeof(trace));
|
|
|
|
|
|
|
|
VectorSubtract(end, start, delta);
|
|
|
|
bestlen = Length(delta);
|
|
|
|
|
|
|
|
VectorCopy (end, impact);
|
|
|
|
|
|
|
|
for (i=0 ; i< pmove.numphysent ; i++)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
pe = &pmove.physents[i];
|
2009-03-03 01:52:30 +00:00
|
|
|
if (pe->nonsolid)
|
|
|
|
continue;
|
2008-11-09 22:29:28 +00:00
|
|
|
if (pe->model)
|
|
|
|
{
|
|
|
|
VectorSubtract(start, pe->origin, ts);
|
|
|
|
VectorSubtract(end, pe->origin, te);
|
|
|
|
pe->model->funcs.Trace(pe->model, 0, 0, ts, te, vec3_origin, vec3_origin, &trace);
|
|
|
|
if (trace.fraction<1)
|
|
|
|
{
|
|
|
|
VectorSubtract(trace.endpos, ts, delta);
|
|
|
|
len = Length(delta);
|
|
|
|
if (len < bestlen)
|
|
|
|
{
|
|
|
|
bestlen = len;
|
|
|
|
VectorCopy (trace.plane.normal, normal);
|
|
|
|
VectorAdd (pe->origin, trace.endpos, impact);
|
|
|
|
}
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
clipped=true;
|
|
|
|
}
|
|
|
|
if (trace.startsolid)
|
|
|
|
{
|
|
|
|
VectorNormalize(delta);
|
|
|
|
normal[0] = -delta[0];
|
|
|
|
normal[1] = -delta[1];
|
|
|
|
normal[2] = -delta[2];
|
|
|
|
VectorCopy (start, impact);
|
|
|
|
return true;
|
|
|
|
}
|
2004-08-23 00:15:46 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (clipped)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-07-01 19:23:00 +00:00
|
|
|
return false;
|
2008-11-09 22:29:28 +00:00
|
|
|
}
|
2005-03-10 03:55:18 +00:00
|
|
|
}
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
//handy utility...
|
|
|
|
void P_EmitEffect (vec3_t pos, int type, trailstate_t **tsk)
|
2005-09-08 22:52:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
if (cl.paused)
|
|
|
|
return;
|
|
|
|
|
|
|
|
pe->RunParticleEffectState(pos, NULL, host_frametime, type, tsk);
|
2005-09-08 22:52:46 +00:00
|
|
|
}
|
|
|
|
|
2004-08-23 00:15:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// P_SelectableTrail: given default/opposite effects, model pointer, and a user selection cvar
|
|
|
|
// changes model to the appropriate trail effect and default trail index
|
|
|
|
void P_SelectableTrail(model_t *model, cvar_t *selection, int mdleffect, int mdlcidx, int oppeffect, int oppcidx)
|
2005-05-17 02:36:54 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
int select = (int)(selection->value);
|
|
|
|
|
|
|
|
switch (select)
|
2005-05-17 02:36:54 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
case 0: // check for string, otherwise no trail
|
|
|
|
if (selection->string[0] == '0')
|
2007-05-25 22:16:29 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_INVALID;
|
|
|
|
break;
|
2007-05-25 22:16:29 +00:00
|
|
|
}
|
|
|
|
else
|
2005-05-17 02:36:54 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
int effect = P_FindParticleType(selection->string);
|
2005-05-17 02:36:54 +00:00
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (effect >= 0)
|
2007-05-25 22:16:29 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = effect;
|
|
|
|
model->traildefaultindex = mdlcidx;
|
|
|
|
break;
|
2007-05-25 22:16:29 +00:00
|
|
|
}
|
2005-05-17 02:36:54 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
// fall through to default (so semicheat will work properly)
|
|
|
|
case 1: // default model effect
|
2007-05-25 22:16:29 +00:00
|
|
|
default:
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = mdleffect;
|
|
|
|
model->traildefaultindex = mdlcidx;
|
|
|
|
break;
|
|
|
|
case 2: // opposite effect
|
|
|
|
model->particletrail = oppeffect;
|
|
|
|
model->traildefaultindex= oppcidx;
|
|
|
|
break;
|
|
|
|
case 3: // alt rocket effect
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_ALTROCKET");
|
|
|
|
model->traildefaultindex = 107;
|
|
|
|
break;
|
|
|
|
case 4: // gib
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_BLOOD");
|
|
|
|
model->traildefaultindex = 70;
|
|
|
|
break;
|
|
|
|
case 5: // zombie gib
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_SLIGHTBLOOD");
|
|
|
|
model->traildefaultindex = 70;
|
|
|
|
break;
|
|
|
|
case 6: // Scrag tracer
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_WIZSPIKE");
|
|
|
|
model->traildefaultindex = 60;
|
|
|
|
break;
|
|
|
|
case 7: // Knight tracer
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_KNIGHTSPIKE");
|
|
|
|
model->traildefaultindex = 238;
|
|
|
|
break;
|
|
|
|
case 8: // Vore tracer
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_VORESPIKE");
|
|
|
|
model->traildefaultindex = 154;
|
|
|
|
break;
|
|
|
|
case 9: // rail trail
|
|
|
|
model->particletrail = P_ParticleTypeForName("TR_RAILTRAIL");
|
|
|
|
model->traildefaultindex = 15;
|
2007-05-25 22:16:29 +00:00
|
|
|
break;
|
2005-05-17 02:36:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-08-23 00:15:46 +00:00
|
|
|
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
//figure out which particle trail to use for the given model, filling in its values as required.
|
|
|
|
void P_DefaultTrail (model_t *model)
|
|
|
|
{
|
|
|
|
// TODO: EF_BRIGHTFIELD should probably be handled in here somewhere
|
|
|
|
// TODO: make trail default color into RGB values instead of indexes
|
|
|
|
if (model->engineflags & MDLF_NODEFAULTTRAIL)
|
2004-08-23 00:15:46 +00:00
|
|
|
return;
|
|
|
|
|
2008-11-09 22:29:28 +00:00
|
|
|
if (model->flags & EF_ROCKET)
|
|
|
|
P_SelectableTrail(model, &r_rockettrail, P_ParticleTypeForName("TR_ROCKET"), 109, P_ParticleTypeForName("TR_GRENADE"), 6);
|
|
|
|
else if (model->flags & EF_GRENADE)
|
|
|
|
P_SelectableTrail(model, &r_grenadetrail, P_ParticleTypeForName("TR_GRENADE"), 6, P_ParticleTypeForName("TR_ROCKET"), 109);
|
|
|
|
else if (model->flags & EF_GIB)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("TR_BLOOD");
|
|
|
|
model->traildefaultindex = 70;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EF_TRACER)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("TR_WIZSPIKE");
|
|
|
|
model->traildefaultindex = 60;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EF_ZOMGIB)
|
2005-01-04 19:19:51 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("TR_SLIGHTBLOOD");
|
|
|
|
model->traildefaultindex = 70;
|
2005-01-04 19:19:51 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EF_TRACER2)
|
2005-01-04 19:19:51 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("TR_KNIGHTSPIKE");
|
|
|
|
model->traildefaultindex = 238;
|
2005-01-04 19:19:51 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EF_TRACER3)
|
2006-08-20 00:47:13 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("TR_VORESPIKE");
|
|
|
|
model->traildefaultindex = 154;
|
2006-08-20 00:47:13 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_BLOODSHOT) //these are the hexen2 ones.
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_bloodshot");
|
|
|
|
model->traildefaultindex = 136;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_FIREBALL)
|
2005-06-22 17:10:13 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_fireball");
|
|
|
|
model->traildefaultindex = 424;
|
2005-06-22 17:10:13 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_ACIDBALL)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_acidball");
|
|
|
|
model->traildefaultindex = 440;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_ICE)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_ice");
|
|
|
|
model->traildefaultindex = 408;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_SPIT)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_spit");
|
|
|
|
model->traildefaultindex = 260;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_SPELL)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_spell");
|
|
|
|
model->traildefaultindex = 260;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_VORP_MISSILE)
|
2004-08-23 00:15:46 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_vorpmissile");
|
|
|
|
model->traildefaultindex = 302;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_SET_STAFF)
|
2005-11-26 23:11:19 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_setstaff");
|
|
|
|
model->traildefaultindex = 424;
|
2005-11-26 23:11:19 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_MAGICMISSILE)
|
2005-11-26 23:11:19 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_magicmissile");
|
|
|
|
model->traildefaultindex = 149;
|
2005-11-26 23:11:19 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_BONESHARD)
|
2005-11-26 23:11:19 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_boneshard");
|
|
|
|
model->traildefaultindex = 384;
|
2005-11-26 23:11:19 +00:00
|
|
|
}
|
2008-11-09 22:29:28 +00:00
|
|
|
else if (model->flags & EFH2_SCARAB)
|
2005-11-26 23:11:19 +00:00
|
|
|
{
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_ParticleTypeForName("t_scarab");
|
2005-11-26 23:11:19 +00:00
|
|
|
model->traildefaultindex = 254;
|
|
|
|
}
|
2004-08-23 00:15:46 +00:00
|
|
|
else
|
2008-11-09 22:29:28 +00:00
|
|
|
model->particletrail = P_INVALID;
|
2004-08-23 00:15:46 +00:00
|
|
|
}
|