Fixed index variable in P_OpenMapData.

SVN r192 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-15 08:26:13 +00:00
parent d99f5b4b99
commit ba78504419
3 changed files with 5 additions and 4 deletions

View File

@ -55,6 +55,7 @@ enum
ML_BLOCKMAP, // LUT, motion clipping, walls/grid element
ML_BEHAVIOR, // [RH] Hexen-style scripts. If present, THINGS
// and LINEDEFS are also Hexen-style.
ML_MAX,
// [RH] These are compressed (and extended) nodes. They combine the data from
// vertexes, segs, ssectors, and nodes into a single lump.

View File

@ -207,7 +207,7 @@ static int GetMapIndex(const char *mapname, int lastindex, const char *lumpname,
{"REJECT", false},
{"BLOCKMAP", false},
{"BEHAVIOR", false},
{"SCRIPTS", false},
//{"SCRIPTS", false},
};
if (lumpname==NULL) lumpname="";
@ -296,7 +296,7 @@ MapData *P_OpenMapData(const char * mapname)
map->MapLumps[index].FilePos = Wads.GetLumpOffset(lump_name + i);
map->MapLumps[index].Size = Wads.LumpLength(lump_name + i);
strncpy(map->MapLumps[i].Name, lumpname, 8);
strncpy(map->MapLumps[index].Name, lumpname, 8);
}
return map;
}
@ -351,7 +351,7 @@ MapData *P_OpenMapData(const char * mapname)
map->MapLumps[index].FilePos = offset;
map->MapLumps[index].Size = size;
strncpy(map->MapLumps[i].Name, lumpname, 8);
strncpy(map->MapLumps[index].Name, lumpname, 8);
}
}
else

View File

@ -30,7 +30,7 @@
struct MapData
{
wadlump_t MapLumps[ML_BEHAVIOR+1];
wadlump_t MapLumps[ML_MAX];
bool HasBehavior;
bool CloseOnDestruct;
bool Encrypted;