[sw] Make worldent local static

It being on the stack was a bad idea as R_RenderWorld returns before the
scans are rendered and thus the entity pointer winds up pointing to
abandoned stack space.
This commit is contained in:
Bill Currie 2022-03-15 16:53:10 +09:00
parent 91d7a80dff
commit ab78e9d2ff

View file

@ -521,7 +521,7 @@ R_RenderWorld (void)
{
int i;
btofpoly_t btofpolys[MAX_BTOFPOLYS];
entity_t worldent = {};
static entity_t worldent = {};
entity_t *ent = &worldent;
mod_brush_t *brush = &r_refdef.worldmodel->brush;
swbspctx_t bspctx = {