diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 2296d2687..5a2545f0b 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -290,6 +290,7 @@ MapData *P_OpenMapData(const char * mapname) // names and for any valid level lump this always returns the short name. const char * lumpname = Wads.GetLumpFullName(lump_name + i); index = GetMapIndex(mapname, index, lumpname, i != 1 || map->MapLumps[0].Size == 0); + if (index == ML_BEHAVIOR) map->HasBehavior = true; // The next lump is not part of this map anymore if (index < 0) break; @@ -339,6 +340,7 @@ MapData *P_OpenMapData(const char * mapname) if (i>0) { index = GetMapIndex(maplabel, index, lumpname, true); + if (index == ML_BEHAVIOR) map->HasBehavior = true; // The next lump is not part of this map anymore if (index < 0) break; @@ -3461,12 +3463,12 @@ void P_SetupLevel (char *lumpname, int position) FWadLump test; DWORD id = MAKE_ID('X','x','X','x'), idcheck; - if (map->MapLumps[ML_ZNODES].Size != 0) + if (map->MapLumps[ML_ZNODES].Size != 0 && !UsingGLNodes) { map->Seek(ML_ZNODES); idcheck = MAKE_ID('Z','N','O','D'); } - else + else if (map->MapLumps[ML_ZNODES].Size != 0) { // If normal nodes are not present but GL nodes are, use them. map->Seek(ML_GLZNODES); @@ -3517,21 +3519,6 @@ void P_SetupLevel (char *lumpname, int position) unclock (times[9]); } - /* Checking for compressed GL nodes is similar to above, and - * should look something like this: - FWadLump test = Wads.OpenLumpNum (lumpnum+ML_GLZNODES); - DWORD id; - - test.Read (&id, 4); - if (id == MAKE_ID('Z','G','L','N')) - { - P_LoadGLZNodes (test); - } - else - { - // Load normal GL nodes, if present - } - */ } if (ForceNodeBuild) { @@ -3547,8 +3534,8 @@ void P_SetupLevel (char *lumpname, int position) lines, numlines }; leveldata.FindMapBounds (); - FNodeBuilder builder (leveldata, polyspots, anchors, genglnodes, CPU.bSSE2); - UsingGLNodes = genglnodes; + UsingGLNodes |= genglnodes; + FNodeBuilder builder (leveldata, polyspots, anchors, UsingGLNodes, CPU.bSSE2); delete[] vertexes; builder.Extract (nodes, numnodes, segs, numsegs, diff --git a/src/thingdef.cpp b/src/thingdef.cpp index dc72263fe..3ccad157a 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -1665,6 +1665,13 @@ do_stop: v=clamp(sc_Number, 0, 90); break; + case '!': // not boolean (to simulate parameters which default to 1) + SC_MustGetNumber(); + v=!sc_Number; + break; + + */ + case 'I': case 'i': // Integer SC_MustGetNumber(); @@ -1677,12 +1684,6 @@ do_stop: v=fixed_t(sc_Float*FRACUNIT); break; - case '!': // not boolean (to simulate parameters which default to 1) - SC_MustGetNumber(); - v=!sc_Number; - break; - - */ case 'S': case 's': // Sound name