void CL_ExpandCSQCRenderEntities(int num)
{
+ int i;
int oldmaxcsqcrenderentities;
entity_render_t *oldcsqcrenderentities;
if (num >= cl.max_csqcrenderentities)
if (oldcsqcrenderentities)
{
memcpy(cl.csqcrenderentities, oldcsqcrenderentities, oldmaxcsqcrenderentities * sizeof(entity_render_t));
+ for (i = 0;i < r_refdef.scene.numentities;i++)
+ if(r_refdef.scene.entities[i] >= oldcsqcrenderentities && r_refdef.scene.entities[i] < (oldcsqcrenderentities + oldmaxcsqcrenderentities))
+ r_refdef.scene.entities[i] = cl.csqcrenderentities + (r_refdef.scene.entities[i] - oldcsqcrenderentities);
Mem_Free(oldcsqcrenderentities);
}
}