gl1,vk,soft: fix open player model select

This commit is contained in:
Denis Pauk 2023-10-20 01:12:20 +03:00
parent 5ca0b0ce5d
commit f26caa7e72
3 changed files with 9 additions and 4 deletions

View file

@ -118,7 +118,7 @@ R_RenderDlights(void)
void
RI_PushDlights(void)
{
if (r_flashblend->value)
if (r_flashblend->value || !r_worldmodel)
{
return;
}
@ -126,6 +126,6 @@ RI_PushDlights(void)
/* because the count hasn't advanced yet for this frame */
r_dlightframecount = r_framecount + 1;
R_PushDlights(&r_newrefdef, r_worldmodel->nodes, r_dlightframecount,
r_worldmodel->surfaces);
R_PushDlights(&r_newrefdef, r_worldmodel->nodes,
r_dlightframecount, r_worldmodel->surfaces);
}

View file

@ -40,6 +40,11 @@ RI_PushDlights
void
RI_PushDlights(const model_t *model)
{
if (!model)
{
return;
}
R_PushDlights(&r_newrefdef, model->nodes + model->firstnode,
r_framecount, model->surfaces);
}

View file

@ -108,7 +108,7 @@ R_RenderDlights(void)
void
RI_PushDlights(void)
{
if (r_flashblend->value)
if (r_flashblend->value || !r_worldmodel)
{
return;
}