mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
Check for fog functions before calling them.
Not all renderers support fog.
This commit is contained in:
parent
6ea4e6617a
commit
a0e143e601
2 changed files with 6 additions and 3 deletions
|
@ -325,7 +325,8 @@ CL_NewMap (const char *mapname)
|
|||
if (cl.edicts) {
|
||||
cl.worldspawn = PL_ObjectAtIndex (cl.edicts, 0);
|
||||
CL_LoadSky ();
|
||||
r_funcs->Fog_ParseWorldspawn (cl.worldspawn);
|
||||
if (r_funcs->Fog_ParseWorldspawn)
|
||||
r_funcs->Fog_ParseWorldspawn (cl.worldspawn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1141,7 +1142,8 @@ CL_ParseServerMessage (void)
|
|||
blue = MSG_ReadByte (net_message) / 255.0;
|
||||
time = (short) MSG_ReadShort (net_message) / 100.0;
|
||||
time = max (0.0, time);
|
||||
r_funcs->Fog_Update (density, red, green, blue, time);
|
||||
if (r_funcs->Fog_Update)
|
||||
r_funcs->Fog_Update (density, red, green, blue, time);
|
||||
}
|
||||
break;
|
||||
case svc_spawnbaseline2:
|
||||
|
|
|
@ -312,7 +312,8 @@ CL_NewMap (const char *mapname)
|
|||
if (cl.edicts) {
|
||||
cl.worldspawn = PL_ObjectAtIndex (cl.edicts, 0);
|
||||
CL_LoadSky ();
|
||||
r_funcs->Fog_ParseWorldspawn (cl.worldspawn);
|
||||
if (r_funcs->Fog_ParseWorldspawn)
|
||||
r_funcs->Fog_ParseWorldspawn (cl.worldspawn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue