static void CL_SetupWorldModel(void)
{
// update the world model
- cl.entities[0].render.model = cl.worldmodel = cl.model_precache[1];
+ cl.entities[0].render.model = cl.worldmodel = CL_GetModelByIndex(1);
CL_UpdateRenderEntity(&cl.entities[0].render);
// set up csqc world for collision culling
void CL_ParseDownload(void)
{
int i, start, size;
- unsigned char data[65536];
+ unsigned char data[NET_MAXMESSAGE];
start = MSG_ReadLong();
size = (unsigned short)MSG_ReadShort();
if (!(s->flags & RENDER_COLORMAPPED) && s->colormap > cl.maxclients)
Con_DPrintf("CL_ValidateState: colormap (%i) > cl.maxclients (%i)\n", s->colormap, cl.maxclients);
- model = cl.model_precache[s->modelindex];
+ model = CL_GetModelByIndex(s->modelindex);
if (model && model->type && s->frame >= model->numframes)
Con_DPrintf("CL_ValidateState: no such frame %i in \"%s\" (which has %i frames)\n", s->frame, model->name, model->numframes);
if (model && model->type && s->skin > 0 && s->skin >= model->numskins && !(s->lightpflags & PFLAGS_FULLDYNAMIC))
// note that this case must do everything the following case does too
}
+ else if ((ent->state_previous.effects & EF_RESTARTANIM_BIT) != (ent->state_current.effects & EF_RESTARTANIM_BIT))
+ {
+ ent->render.framegroupblend[1] = ent->render.framegroupblend[0];
+ ent->render.framegroupblend[1].lerp = 1;
+ ent->render.framegroupblend[0].frame = ent->state_current.frame;
+ ent->render.framegroupblend[0].start = cl.time;
+ ent->render.framegroupblend[0].lerp = 0;
+ }
else if (DotProduct(odelta, odelta) > 1000*1000
|| (cl.fixangle[0] && !cl.fixangle[1])
|| (ent->state_previous.tagindex != ent->state_current.tagindex)
}
// copy it to the current state
- ent->render.model = cl.model_precache[ent->state_baseline.modelindex];
+ ent->render.model = CL_GetModelByIndex(ent->state_baseline.modelindex);
ent->render.framegroupblend[0].frame = ent->state_baseline.frame;
ent->render.framegroupblend[0].lerp = 1;
// make torchs play out of sync