write the texdata correctly and actually write the leaf info

This commit is contained in:
Bill Currie 2002-09-20 18:17:36 +00:00
parent 56843557f6
commit b59a945566
1 changed files with 4 additions and 1 deletions

View File

@ -183,6 +183,8 @@ WriteLeaf (node_t *node)
}
leaf_p.nummarksurfaces = bsp->nummarksurfaces - leaf_p.firstmarksurface;
BSP_AddLeaf (bsp, &leaf_p);
printf ("nummarksurfaces: %d\n", bsp->nummarksurfaces);
}
void
@ -449,11 +451,12 @@ WriteMiptex (void)
l->nummiptex = nummiptex;
data->size = (char *) &l->dataofs[nummiptex] - data->str;
dstring_adjust (data);
l = (dmiptexlump_t *) data->str;
for (i = 0; i < nummiptex; i++) {
l = (dmiptexlump_t *) data->str;
l->dataofs[i] = data->size;
len = LoadLump (miptex[i], data);
l = (dmiptexlump_t *) data->str;
if (!len)
l->dataofs[i] = -1; // didn't find the texture
}