]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed q3bsp bug where firstmodelsurface was not being set (caused bmodels to render...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Mar 2005 20:55:59 +0000 (20:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 7 Mar 2005 20:55:59 +0000 (20:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5050 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 6653bb19554e370dd48660973d7c799969d2d243..758231aa16d6bb5243235d7ff736bae5dd054ebd 100644 (file)
@@ -5602,10 +5602,11 @@ void Mod_Q3BSP_Load(model_t *mod, void *buffer)
                mod->brush.submodel = i;
 
                // make the model surface list (used by shadowing/lighting)
+               mod->firstmodelsurface = mod->brushq3.data_models[i].firstsurface - mod->brushq3.data_faces;
                mod->nummodelsurfaces = mod->brushq3.data_models[i].numsurfaces;
                mod->surfacelist = Mem_Alloc(loadmodel->mempool, mod->nummodelsurfaces * sizeof(*mod->surfacelist));
                for (j = 0;j < mod->nummodelsurfaces;j++)
-                       mod->surfacelist[j] = (mod->brushq3.data_models[i].firstsurface - mod->brushq3.data_faces) + j;
+                       mod->surfacelist[j] = mod->firstmodelsurface + j;
 
                VectorCopy(mod->brushq3.data_models[i].mins, mod->normalmins);
                VectorCopy(mod->brushq3.data_models[i].maxs, mod->normalmaxs);