extern void R_Q3BSP_DrawLight(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltofilter, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz);
void Mod_Q3BSP_Load(model_t *mod, void *buffer)
{
- int i;
+ int i, j;
q3dheader_t *header;
float corner[3], yawradius, modelradius;
mod->radius = modelradius;
mod->radius2 = modelradius * modelradius;
- for (i = 0;i < mod->brushq3.data_thismodel->numfaces;i++)
- if (mod->brushq3.data_thismodel->firstface[i].texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY)
+ for (j = 0;j < mod->brushq3.data_thismodel->numfaces;j++)
+ if (mod->brushq3.data_thismodel->firstface[j].texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY)
break;
- if (i < mod->brushq3.data_thismodel->numfaces)
+ if (j < mod->brushq3.data_thismodel->numfaces)
mod->DrawSky = R_Q3BSP_DrawSky;
}
}