Merge branch 'master' into scripting
Conflicts: src/g_shared/a_randomspawner.cpp src/g_strife/a_strifeweapons.cpp src/thingdef/thingdef_parse.cpp wadsrc/static/actors/constants.txt
This commit is contained in:
commit
251cdacf26
30 changed files with 168 additions and 57 deletions
|
|
@ -250,7 +250,7 @@ static int GetMapIndex(const char *mapname, int lastindex, const char *lumpname,
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
MapData *P_OpenMapData(const char * mapname)
|
||||
MapData *P_OpenMapData(const char * mapname, bool justcheck)
|
||||
{
|
||||
MapData * map = new MapData;
|
||||
FileReader * wadReader = NULL;
|
||||
|
|
@ -331,13 +331,18 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
const char * lumpname = Wads.GetLumpFullName(lump_name + i);
|
||||
try
|
||||
{
|
||||
index = GetMapIndex(mapname, index, lumpname, true);
|
||||
index = GetMapIndex(mapname, index, lumpname, !justcheck);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
delete map;
|
||||
throw;
|
||||
}
|
||||
if (index == -2)
|
||||
{
|
||||
delete map;
|
||||
return NULL;
|
||||
}
|
||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||
|
||||
// The next lump is not part of this map anymore
|
||||
|
|
@ -471,13 +476,18 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
{
|
||||
try
|
||||
{
|
||||
index = GetMapIndex(maplabel, index, lumpname, true);
|
||||
index = GetMapIndex(maplabel, index, lumpname, !justcheck);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
delete map;
|
||||
throw;
|
||||
}
|
||||
if (index == -2)
|
||||
{
|
||||
delete map;
|
||||
return NULL;
|
||||
}
|
||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||
|
||||
// The next lump is not part of this map anymore
|
||||
|
|
@ -508,7 +518,7 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
|
||||
bool P_CheckMapData(const char *mapname)
|
||||
{
|
||||
MapData *mapd = P_OpenMapData(mapname);
|
||||
MapData *mapd = P_OpenMapData(mapname, true);
|
||||
if (mapd == NULL) return false;
|
||||
delete mapd;
|
||||
return true;
|
||||
|
|
@ -3607,7 +3617,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
P_FreeLevelData ();
|
||||
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
|
||||
|
||||
MapData *map = P_OpenMapData(lumpname);
|
||||
MapData *map = P_OpenMapData(lumpname, true);
|
||||
if (map == NULL)
|
||||
{
|
||||
I_Error("Unable to open map '%s'\n", lumpname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue