- Reworked a few options that previously depended on LEVEL_HEXENFORMAT

(actors being forced to the ground by instantly moving sectors, strife
  railing handling and shooting lines with a non-zero but unassigned tag.)
  With UDMF such semantics have to be handled diffently. 
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.


SVN r987 (trunk)
This commit is contained in:
Christoph Oelckers 2008-05-22 19:35:38 +00:00
commit ab6b5e337e
28 changed files with 843 additions and 226 deletions

View file

@ -370,6 +370,7 @@ MapData *P_OpenMapData(const char * mapname)
else if (!stricmp(lumpname, "BEHAVIOR"))
{
index = ML_BEHAVIOR;
map->HasBehavior = true;
}
else if (!stricmp(lumpname, "ENDMAP"))
{
@ -411,14 +412,16 @@ MapData *P_OpenMapData(const char * mapname)
(*map->file) >> numentries >> dirofs;
map->file->Seek(dirofs, SEEK_SET);
for(DWORD i = 0; i < numentries; i++)
(*map->file) >> map->MapLumps[0].FilePos >> map->MapLumps[0].Size;
map->file->Read(map->MapLumps[0].Name, 8);
for(DWORD i = 1; i < numentries; i++)
{
DWORD offset, size;
char lumpname[8];
(*map->file) >> offset >> size;
map->file->Read(lumpname, 8);
if (i == 1 && !strnicmp(lumpname, "TEXTMAP", 8))
{
map->isText = true;
@ -432,28 +435,29 @@ MapData *P_OpenMapData(const char * mapname)
{
I_Error("Invalid map definition for %s", mapname);
}
else if (!stricmp(lumpname, "ZNODES"))
else if (!strnicmp(lumpname, "ZNODES",8))
{
index = ML_GLZNODES;
}
else if (!stricmp(lumpname, "BLOCKMAP"))
else if (!strnicmp(lumpname, "BLOCKMAP",8))
{
// there is no real point in creating a blockmap but let's use it anyway
index = ML_BLOCKMAP;
}
else if (!stricmp(lumpname, "REJECT"))
else if (!strnicmp(lumpname, "REJECT",8))
{
index = ML_REJECT;
}
else if (!stricmp(lumpname, "DIALOGUE"))
else if (!strnicmp(lumpname, "DIALOGUE",8))
{
index = ML_CONVERSATION;
}
else if (!stricmp(lumpname, "BEHAVIOR"))
else if (!strnicmp(lumpname, "BEHAVIOR",8))
{
index = ML_BEHAVIOR;
map->HasBehavior = true;
}
else if (!stricmp(lumpname, "ENDMAP"))
else if (!strnicmp(lumpname, "ENDMAP",8))
{
return map;
}
@ -1179,6 +1183,7 @@ void P_LoadSectors (MapData * map)
for (i = 0; i < numsectors; i++, ss++, ms++)
{
ss->e = &sectors[0].e[i];
if (!map->HasBehavior) ss->Flags |= SECF_FLOORDROP;
ss->floortexz = LittleShort(ms->floorheight)<<FRACBITS;
ss->floorplane.d = -ss->floortexz;
ss->floorplane.c = FRACUNIT;
@ -3266,6 +3271,16 @@ void P_SetupLevel (char *lumpname, int position)
}
}
if (!map->HasBehavior && !map->isText)
{
// set compatibility flags
if (gameinfo.gametype == GAME_Strife)
{
level.flags |= LEVEL_RAILINGHACK;
}
level.flags |= LEVEL_DUMMYSWITCHES;
}
FBehavior::StaticLoadDefaultModules ();
P_LoadStrifeConversations (map, lumpname);