Ejemplo n.º 1
0
void FGLInterface::EndSerialize(FSerializer &arc)
{
	if (arc.isReading())
	{
		gl_RecreateAllAttachedLights();
		gl_InitPortals();
	}
}
Ejemplo n.º 2
0
void gl_PreprocessLevel()
{
    int i;

    PrepareSegs();
    PrepareSectorData();
    InitVertexData();
    int *checkmap = new int[numvertexes];
    memset(checkmap, -1, sizeof(int)*numvertexes);
    for(i=0; i<numsectors; i++)
    {
        sectors[i].sectornum = i;
        PrepareTransparentDoors(&sectors[i]);

        // This ignores vertices only used for seg splitting because those aren't needed here
        for(int j = 0; j < sectors[i].linecount; j++)
        {
            line_t *l = sectors[i].lines[j];
            if (l->sidedef[0]->Flags & WALLF_POLYOBJ) continue;	// don't bother with polyobjects

            int vtnum1 = int(l->v1 - vertexes);
            int vtnum2 = int(l->v2 - vertexes);

            if (checkmap[vtnum1] < i)
            {
                checkmap[vtnum1] = i;
                sectors[i].e->vertices.Push(&vertexes[vtnum1]);
                vertexes[vtnum1].dirty = true;
            }

            if (checkmap[vtnum2] < i)
            {
                checkmap[vtnum2] = i;
                sectors[i].e->vertices.Push(&vertexes[vtnum2]);
                vertexes[vtnum2].dirty = true;
            }
        }
    }
    delete[] checkmap;

    gl_InitPortals();

    if (GLRenderer != NULL)
    {
        GLRenderer->SetupLevel();
    }

#if 0
    gl_CreateSections();
#endif

    InitGLRMapinfoData();
}