cvar_t r_draweffects = {0, "r_draweffects", "1"};
-cvar_t cl_explosions = {CVAR_SAVE, "cl_explosions", "1"};
cvar_t cl_explosions_alpha_start = {CVAR_SAVE, "cl_explosions_alpha_start", "1.5"};
cvar_t cl_explosions_alpha_end = {CVAR_SAVE, "cl_explosions_alpha_end", "0"};
cvar_t cl_explosions_size_start = {CVAR_SAVE, "cl_explosions_size_start", "16"};
// LordHavoc: have to set up the baseline info for alpha and other stuff
for (i = 0;i < cl_max_entities;i++)
{
- ClearStateToDefault(&cl_entities[i].state_baseline);
- ClearStateToDefault(&cl_entities[i].state_previous);
- ClearStateToDefault(&cl_entities[i].state_current);
+ cl_entities[i].state_baseline = defaultstate;
+ cl_entities[i].state_previous = defaultstate;
+ cl_entities[i].state_current = defaultstate;
}
CL_CGVM_Clear();
// make relative to the entity
matrix = &t->render.matrix;
// if a valid tagindex is used, make it relative to that tag instead
+ // FIXME: use a model function to get tag info (need to handle skeletal)
if (e->state_current.tagentity && e->state_current.tagindex >= 1 && (model = t->render.model) && e->state_current.tagindex <= t->render.model->alias.aliasnum_tags)
{
// blend the matrices
if (e->state_previous.active && e->state_previous.modelindex == e->state_current.modelindex)
{
if (e->render.flags & RENDER_GLOWTRAIL)
- CL_RocketTrail2(e->persistent.trail_origin, origin, e->state_current.glowcolor, e);
- else if (trailtype >= 0)
- CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e);
+ trailtype = 9;
+ if (trailtype >= 0)
+ CL_RocketTrail(e->persistent.trail_origin, origin, trailtype, e->state_current.glowcolor, e);
}
VectorCopy(origin, e->persistent.trail_origin);
// note: the cl.viewentity and intermission check is to hide player
ent = &cl.viewent;
ent->state_previous = ent->state_current;
- ClearStateToDefault(&ent->state_current);
+ ent->state_current = defaultstate;
ent->state_current.time = cl.time;
ent->state_current.number = -1;
ent->state_current.active = true;
// if coming from the player, update the start position
//if (b->entity == cl.viewentity)
// VectorCopy (cl_entities[cl.viewentity].render.origin, b->start);
- if (cl_beams_relative.integer && b->entity && cl_entities[b->entity].state_current.active && b->relativestartvalid)
+ if (cl_beams_relative.integer && b->entity == cl.viewentity && b->entity && cl_entities[b->entity].state_current.active && b->relativestartvalid)
{
entity_state_t *p = &cl_entities[b->entity].state_previous;
//entity_state_t *c = &cl_entities[b->entity].state_current;
Cmd_AddCommand ("pausedemo", CL_PauseDemo_f);
Cvar_RegisterVariable(&r_draweffects);
- Cvar_RegisterVariable(&cl_explosions);
Cvar_RegisterVariable(&cl_explosions_alpha_start);
Cvar_RegisterVariable(&cl_explosions_alpha_end);
Cvar_RegisterVariable(&cl_explosions_size_start);