(but only when isworldmodel is true, which indicates a level change)
this fixes a bug where downloaded maps have missing shaders on the first
load, and also fixes a crash introduced by res on dedicated servers
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7818
d7cf8633-e32d-0410-b094-
e92efae38249
cls.qw_downloadtype = dl_none;
- // parse the Q3 shader files
- Mod_LoadQ3Shaders();
-
// touch all of the precached models that are still loaded so we can free
// anything that isn't needed
if (!sv.active)
{
// loading models
- // parse the Q3 shader files
- if (cl.loadmodel_current < 2)
- Mod_LoadQ3Shaders();
-
for (;cl.loadmodel_current < cl.loadmodel_total;cl.loadmodel_current++)
{
if (cl.model_precache[cl.loadmodel_current] && cl.model_precache[cl.loadmodel_current]->Draw)
VectorSet(mod->rotatedmins, -mod->radius, -mod->radius, -mod->radius);
VectorSet(mod->rotatedmaxs, mod->radius, mod->radius, mod->radius);
+ // if we're loading a worldmodel, then this is a level change, and we
+ // should reload all q3 shaders to make sure they are current (which will
+ // also be used by any other models loaded after this world model)
+ if (mod->isworldmodel)
+ Mod_LoadQ3Shaders();
+
if (buf)
{
char *bufend = (char *)buf + filesize;