mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Split out the surface offset code.
This tidies up LightWorld a little.
This commit is contained in:
parent
48809404b1
commit
5fc8d1eb26
1 changed files with 13 additions and 7 deletions
|
@ -134,17 +134,13 @@ LightThread (void *l)
|
|||
}
|
||||
|
||||
static void
|
||||
LightWorld (void)
|
||||
FindFaceOffsets (void)
|
||||
{
|
||||
int i, j;
|
||||
vec3_t org;
|
||||
entity_t *ent;
|
||||
vec3_t org;
|
||||
const char *name;
|
||||
|
||||
lightdata = dstring_new ();
|
||||
rgblightdata = dstring_new ();
|
||||
surfacelightchain = (lightchain_t **) calloc (bsp->numfaces,
|
||||
sizeof (lightchain_t *));
|
||||
surfaceorgs = (vec3_t *) calloc (bsp->numfaces, sizeof (vec3_t));
|
||||
|
||||
for (i = 1; i < bsp->nummodels; i++) {
|
||||
|
@ -156,8 +152,17 @@ LightWorld (void)
|
|||
if (!strncmp (ValueForKey (ent, "classname"), "rotate_", 7))
|
||||
GetVectorForKey (ent, "origin", org);
|
||||
for (j = 0; j < bsp->models[i].numfaces; j++)
|
||||
VectorCopy (org, surfaceorgs[i]);
|
||||
VectorCopy (org, surfaceorgs[bsp->models[i].firstface]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
LightWorld (void)
|
||||
{
|
||||
lightdata = dstring_new ();
|
||||
rgblightdata = dstring_new ();
|
||||
surfacelightchain = (lightchain_t **) calloc (bsp->numfaces,
|
||||
sizeof (lightchain_t *));
|
||||
|
||||
VisThread (0); // not worth threading :/
|
||||
VisStats ();
|
||||
|
@ -205,6 +210,7 @@ main (int argc, char **argv)
|
|||
|
||||
MakeTnodes (&bsp->models[0]);
|
||||
|
||||
FindFaceOffsets ();
|
||||
LightWorld ();
|
||||
|
||||
WriteEntitiesToString ();
|
||||
|
|
Loading…
Reference in a new issue