Implement CG_R_LOADWORLD properly.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6210 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2022-03-08 05:31:52 +00:00
parent 6ceb76233c
commit 11d385ed77
3 changed files with 9 additions and 7 deletions

View File

@ -870,12 +870,14 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
}
break;
case CG_R_LOADWORLDMAP: //FTE can't distinguish. :/
Con_DPrintf("CG_R_LOADWORLDMAP: not implemented\n");
break; //So long as noone has one collision model with a different rendering one, we'll be fine
case CG_R_LOADWORLDMAP:
{ //rendering
scenefuncs->NewMap(worldfuncs->LoadModel(VM_POINTER(arg[0]), MLV_SILENTSYNC));
}
break;
case CG_CM_LOADMAP:
{
{ //collisions
int i;
char *mapname = VM_POINTER(arg[0]);
ccs.worldmodel = ccs.model_precache[0] = worldfuncs->LoadModel(mapname, MLV_SILENTSYNC);

View File

@ -624,14 +624,14 @@ void CLQ3_ParseGameState(sizebuf_t *msg)
return;
}
scenefuncs->NewMap(NULL);
CG_Restart();
UI_Restart_f();
if (!ccs.worldmodel)
plugfuncs->EndGame("CGame didn't set a map.\n");
scenefuncs->NewMap (ccs.worldmodel);
SCR_EndLoadingPlaque();
ccs.state = ca_active;

View File

@ -3985,7 +3985,7 @@ void Surf_NewMap (model_t *worldmodel)
//evil haxx
r_dynamic.ival = r_dynamic.value;
if (r_dynamic.ival > 0 && cl.worldmodel->fromgame == fg_quake3) //quake3 has no lightmaps, disable r_dynamic
if (r_dynamic.ival > 0 && (!cl.worldmodel || cl.worldmodel->fromgame == fg_quake3)) //quake3 has no lightmaps, disable r_dynamic
r_dynamic.ival = 0;
memset (&r_worldentity, 0, sizeof(r_worldentity));