R_DrawViewModel
=============
*/
+/*
void R_DrawViewModel (void)
{
entity_render_t *ent;
R_UpdateEntLights(ent);
ent->model->Draw(ent);
}
+*/
void R_DrawNoModel(entity_render_t *ent);
void R_DrawModels ()
if (!r_drawentities.integer)
return;
- R_DrawViewModel();
for (i = 0;i < r_refdef.numentities;i++)
{
ent = r_refdef.entities[i];
if (!visiblevolumes)
R_Shadow_Stage_ShadowVolumes();
+ ent = &cl_entities[0].render;
if (wl->shadowvolume && r_staticworldlights.integer)
- R_Shadow_DrawWorldLightShadowVolume(&cl_entities[0].render.matrix, wl);
+ R_Shadow_DrawWorldLightShadowVolume(&ent->matrix, wl);
else
- R_TestAndDrawShadowVolume(&cl_entities[0].render, wl->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(ent, wl->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
if (r_drawentities.integer)
{
for (i = 0;i < r_refdef.numentities;i++)
&& ent->maxs[1] >= wl->mins[1] && ent->mins[1] <= wl->maxs[1]
&& ent->maxs[2] >= wl->mins[2] && ent->mins[2] <= wl->maxs[2]
&& !(ent->effects & EF_ADDITIVE) && ent->alpha == 1)
- R_TestAndDrawShadowVolume(r_refdef.entities[i], wl->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(r_refdef.entities[i], wl->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
}
}
if (wl->numsurfaces)
R_Model_Brush_DrawLightForSurfaceList(ent, relativelightorigin, relativeeyeorigin, lightradius, lightcolor, wl->surfaces, wl->numsurfaces);
else
- ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius, lightcolor);
+ ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius / ent->scale, lightcolor);
}
if (r_drawentities.integer)
{
{
Matrix4x4_Transform(&ent->inversematrix, wl->origin, relativelightorigin);
Matrix4x4_Transform(&ent->inversematrix, r_origin, relativeeyeorigin);
- ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius, lightcolor);
+ ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius / ent->scale, lightcolor);
}
}
}
if (R_Shadow_Stage_EraseShadowVolumes())
{
+ ent = &cl_entities[0].render;
if (wl->shadowvolume && r_staticworldlights.integer)
- R_Shadow_DrawWorldLightShadowVolume(&cl_entities[0].render.matrix, wl);
+ R_Shadow_DrawWorldLightShadowVolume(&ent->matrix, wl);
else
- R_TestAndDrawShadowVolume(&cl_entities[0].render, wl->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(ent, wl->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
if (r_drawentities.integer)
{
for (i = 0;i < r_refdef.numentities;i++)
&& ent->maxs[1] >= wl->mins[1] && ent->mins[1] <= wl->maxs[1]
&& ent->maxs[2] >= wl->mins[2] && ent->mins[2] <= wl->maxs[2]
&& !(ent->effects & EF_ADDITIVE) && ent->alpha == 1)
- R_TestAndDrawShadowVolume(r_refdef.entities[i], wl->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(r_refdef.entities[i], wl->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
}
}
}
if (!visiblevolumes)
R_Shadow_Stage_ShadowVolumes();
- R_TestAndDrawShadowVolume(&cl_entities[0].render, rd->origin, cullradius, lightradius, clipmins, clipmaxs);
+ ent = &cl_entities[0].render;
+ R_TestAndDrawShadowVolume(ent, rd->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
if (r_drawentities.integer)
{
for (i = 0;i < r_refdef.numentities;i++)
{
ent = r_refdef.entities[i];
if (ent != rd->ent && !(ent->effects & EF_ADDITIVE) && ent->alpha == 1)
- R_TestAndDrawShadowVolume(ent, rd->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(ent, rd->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
}
}
{
Matrix4x4_Transform(&ent->inversematrix, rd->origin, relativelightorigin);
Matrix4x4_Transform(&ent->inversematrix, r_origin, relativeeyeorigin);
- ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius, lightcolor);
+ ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius / ent->scale, lightcolor);
}
if (r_drawentities.integer)
{
{
Matrix4x4_Transform(&ent->inversematrix, rd->origin, relativelightorigin);
Matrix4x4_Transform(&ent->inversematrix, r_origin, relativeeyeorigin);
- ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius, lightcolor);
+ ent->model->DrawLight(ent, relativelightorigin, relativeeyeorigin, lightradius / ent->scale, lightcolor);
}
}
}
if (R_Shadow_Stage_EraseShadowVolumes())
{
- R_TestAndDrawShadowVolume(&cl_entities[0].render, rd->origin, cullradius, lightradius, clipmins, clipmaxs);
+ ent = &cl_entities[0].render;
+ R_TestAndDrawShadowVolume(ent, rd->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
if (r_drawentities.integer)
{
for (i = 0;i < r_refdef.numentities;i++)
{
ent = r_refdef.entities[i];
if (ent != rd->ent && !(ent->effects & EF_ADDITIVE) && ent->alpha == 1)
- R_TestAndDrawShadowVolume(ent, rd->origin, cullradius, lightradius, clipmins, clipmaxs);
+ R_TestAndDrawShadowVolume(ent, rd->origin, cullradius / ent->scale, lightradius / ent->scale, clipmins, clipmaxs);
}
}
}