- 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:
parent
3720f7fa7d
commit
7c87465d35
30 changed files with 2361 additions and 5243 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
#include "p_local.h"
|
||||
#include "p_3dmidtex.h"
|
||||
|
||||
// State.
|
||||
#include "r_state.h"
|
||||
|
|
@ -184,15 +185,8 @@ fixed_t P_InterceptVector (const divline_t *v2, const divline_t *v1)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
fixed_t opentop;
|
||||
fixed_t openbottom;
|
||||
fixed_t openrange;
|
||||
fixed_t lowfloor;
|
||||
extern int tmfloorpic;
|
||||
sector_t *openbottomsec;
|
||||
sector_t *opentopsec;
|
||||
|
||||
void P_LineOpening (const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx, fixed_t refy)
|
||||
void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef,
|
||||
fixed_t x, fixed_t y, fixed_t refx, fixed_t refy)
|
||||
{
|
||||
sector_t *front, *back;
|
||||
fixed_t fc, ff, bc, bf;
|
||||
|
|
@ -200,7 +194,7 @@ void P_LineOpening (const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx, f
|
|||
if (linedef->sidenum[1] == NO_SIDE)
|
||||
{
|
||||
// single sided line
|
||||
openrange = 0;
|
||||
open.range = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -214,8 +208,9 @@ void P_LineOpening (const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx, f
|
|||
|
||||
/*Printf ("]]]]]] %d %d\n", ff, bf);*/
|
||||
|
||||
opentopsec = fc < bc? front : back;
|
||||
opentop = fc < bc ? fc : bc;
|
||||
open.topsec = fc < bc? front : back;
|
||||
open.ceilingpic = open.topsec->ceilingpic;
|
||||
open.top = fc < bc ? fc : bc;
|
||||
|
||||
bool usefront;
|
||||
|
||||
|
|
@ -241,20 +236,27 @@ void P_LineOpening (const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx, f
|
|||
|
||||
if (usefront)
|
||||
{
|
||||
openbottom = ff;
|
||||
openbottomsec = front;
|
||||
lowfloor = bf;
|
||||
//tmfloorpic = front->floorpic;
|
||||
open.bottom = ff;
|
||||
open.bottomsec = front;
|
||||
open.floorpic = front->floorpic;
|
||||
open.lowfloor = bf;
|
||||
}
|
||||
else
|
||||
{
|
||||
openbottom = bf;
|
||||
openbottomsec = back;
|
||||
lowfloor = ff;
|
||||
//tmfloorpic = back->floorpic;
|
||||
open.bottom = bf;
|
||||
open.bottomsec = back;
|
||||
open.floorpic = back->floorpic;
|
||||
open.lowfloor = ff;
|
||||
}
|
||||
|
||||
openrange = opentop - openbottom;
|
||||
if (actor != NULL && linedef->frontsector != NULL && linedef->backsector != NULL &&
|
||||
linedef->flags & ML_3DMIDTEX)
|
||||
{
|
||||
open.touchmidtex = P_LineOpening_3dMidtex(actor, linedef, open.top, open.bottom);
|
||||
}
|
||||
else open.touchmidtex = false;
|
||||
|
||||
open.range = open.top - open.bottom;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue