- VC++ doesn't seem to like the TArray serializer so I added a workaround

to be able to save the 3dMidtex attachment info.
- Fixed: The TArray serializer needs to be declared as a friend of TArray
  in order to be able to access its fields.
- Since there are no backwards compatibility issues due to savegame version
  bumping I closed all gaps in the level flag set.
- Bumped min. Savegame version and Netgame version for 3dMidtex related
  changes.
- Changed Jump and Crouch DMFlags into 3-way switches:
  0: map default, 1: off, 2: on. Since I needed new bits the rest of
  the DMFlag bit values had to be changed as a result.
- fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding
  actors without MF3_NOBLOCKMONST.
- Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange'
  that can enable or disable switch range checking globally per map.
- Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE.
- Added a ML_CHECKSWITCHRANGE flag which allows checking whether the 
  player can actually reach the switch he wants to use.
- Made DActiveButton::EWhere global so that I can use it outside thr
  DActiveButton class.

March 17, 2008 (Changes by Graf Zahl)
- Changed P_LineOpening to pass its result in a struct instead of global
  variables.
- Added Eternity's 3DMIDTEX feature (no Eternity code used though.)
  It should be feature complete with the exception of the ML_BLOCKMONSTERS
  flag handling. That particular part of Eternity's implementation is
  sub-optimal because it hijacks an existing flag and doesn't seem to make
  much sense to me. Maybe I'll implement it as a separate flag later.


SVN r810 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-18 18:18:18 +00:00
commit 7c87465d35
30 changed files with 2361 additions and 5243 deletions

View file

@ -1043,8 +1043,13 @@ void P_LoadSectors (MapData * map)
map->Read(ML_SECTORS, msp);
ms = (mapsector_t*)msp;
ss = sectors;
// Extended properties
sectors[0].e = new extsector_t[numsectors];
for (i = 0; i < numsectors; i++, ss++, ms++)
{
ss->e = &sectors[0].e[i];
ss->floortexz = LittleShort(ms->floorheight)<<FRACBITS;
ss->floorplane.d = -ss->floortexz;
ss->floorplane.c = FRACUNIT;
@ -1971,6 +1976,7 @@ void P_LoadLineDefs (MapData * map)
P_SaveLineSpecial (ld);
if (level.flags & LEVEL_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
if (level.flags & LEVEL_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags & LEVEL_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
}
delete[] mldf;
}
@ -2047,6 +2053,7 @@ void P_LoadLineDefs2 (MapData * map)
P_SaveLineSpecial (ld);
if (level.flags & LEVEL_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
if (level.flags & LEVEL_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags & LEVEL_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
}
delete[] mldf;
}
@ -3347,6 +3354,7 @@ void P_FreeLevelData ()
level.total_monsters = level.total_items = level.total_secrets =
level.killed_monsters = level.found_items = level.found_secrets =
wminfo.maxfrags = 0;
FBehavior::StaticUnloadModules ();
if (vertexes != NULL)
{
@ -3360,6 +3368,7 @@ void P_FreeLevelData ()
}
if (sectors != NULL)
{
delete[] sectors[0].e;
delete[] sectors;
sectors = NULL;
numsectors = 0; // needed for the pointer cleanup code
@ -3723,7 +3732,7 @@ void P_SetupLevel (char *lumpname, int position)
subsectors, numsubsectors,
vertexes, numvertexes);
endTime = I_MSTime ();
Printf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs);
DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs);
}
clock (times[10]);
@ -3780,6 +3789,9 @@ void P_SetupLevel (char *lumpname, int position)
}
delete map;
// set up world state
P_SpawnSpecials ();
clock (times[16]);
PO_Init (); // Initialize the polyobjs
unclock (times[16]);
@ -3797,8 +3809,6 @@ void P_SetupLevel (char *lumpname, int position)
}
}
// set up world state
P_SpawnSpecials ();
// build subsector connect matrix
// UNUSED P_ConnectSubsectors ();