From 7714a45e02876b7b548be4d031a75e329fe7a396 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 14 Feb 2013 05:06:05 +0000 Subject: [PATCH] - Fixed: Because P_OpenMapData() now reopens the containing file for the map, P_LoadGLNodes() needs a new check for if the map came from a regular wad. SVN r4136 (trunk) --- src/p_glnodes.cpp | 2 +- src/p_setup.cpp | 1 + src/p_setup.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 22bf18e26..48db99b67 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -901,7 +901,7 @@ bool P_LoadGLNodes(MapData * map) char path[256]; int li; int lumpfile = Wads.GetLumpFile(map->lumpnum); - bool mapinwad = map->file == Wads.GetFileReader(lumpfile); + bool mapinwad = map->InWad; FileReader * fr = map->file; FResourceFile * f_gwa = NULL; diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 4cd337ca5..261d47ea3 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -304,6 +304,7 @@ MapData *P_OpenMapData(const char * mapname) // As such any special handling for other types of lumps is skipped. map->MapLumps[0].Reader = map->file = Wads.ReopenLumpNum(lump_name); map->Encrypted = Wads.IsEncryptedFile(lump_name); + map->InWad = true; if (map->Encrypted) { // If it's encrypted, then it's a Blood file, presumably a map. diff --git a/src/p_setup.h b/src/p_setup.h index b1590e714..61cda54fe 100644 --- a/src/p_setup.h +++ b/src/p_setup.h @@ -37,6 +37,7 @@ struct MapData bool HasBehavior; bool Encrypted; bool isText; + bool InWad; int lumpnum; FileReader * file; FResourceFile * resource; @@ -50,6 +51,7 @@ struct MapData HasBehavior = false; Encrypted = false; isText = false; + InWad = false; } ~MapData()