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

View file

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

View file

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