Con_Printf("Mod_LoadSkinFiles: parsing error in file \"%s_%i.skin\" on line #%i: wrong number of parameters to command \"%s\", see documentation in DP_GFX_SKINFILES extension in dpextensions.qc\n", loadmodel->name, i, line, word[0]);
Con_Printf("Mod_LoadSkinFiles: parsing error in file \"%s_%i.skin\" on line #%i: does not look like tag or mesh specification, or replace command, see documentation in DP_GFX_SKINFILES extension in dpextensions.qc\n", loadmodel->name, i, line);
@@ -2881,41+2884,81 @@ void Mod_VertexRangeFromElements(int numelements, const int *elements, int *firs
*lastvertexpointer = lastvertex;
}
+void Mod_SetDrawSkyAndWater(model_t* mod)
+{
+ int j;
+ uint64_t basematerialflags = 0;
+ // by default assume there is no sky or water used in this model
+ mod->DrawSky = NULL;
+ mod->DrawAddWaterPlanes = NULL;
+ // combine all basematerialflags observed in the submodelsurfaces range, then check for special flags
+ for (j = mod->submodelsurfaces_start; j < mod->submodelsurfaces_end; j++)