- added UDMF LOcknumber property, submitted by Nightfall.

SVN r3331 (trunk)
This commit is contained in:
Christoph Oelckers 2011-12-12 16:07:32 +00:00
parent 3b8f5e0d39
commit b1905c16ef
5 changed files with 75 additions and 57 deletions

View File

@ -1913,12 +1913,13 @@ bool AM_Check3DFloors(line_t *line)
//=============================================================================
void AM_drawWalls (bool allmap)
{
int i;
static mline_t l;
for (i = 0; i < numlines; i++)
{
{
int i;
static mline_t l;
int lock, color;
for (i = 0; i < numlines; i++)
{
l.a.x = lines[i].v1->x >> FRACTOMAPBITS;
l.a.y = lines[i].v1->y >> FRACTOMAPBITS;
l.b.x = lines[i].v2->x >> FRACTOMAPBITS;
@ -1948,14 +1949,22 @@ void AM_drawWalls (bool allmap)
else if (lines[i].flags & ML_SECRET)
{ // secret door
if (am_cheat != 0 && lines[i].backsector != NULL)
AM_drawMline(&l, SecretWallColor);
else
AM_drawMline(&l, WallColor);
}
else if ((lines[i].special == Teleport ||
lines[i].special == Teleport_NoFog ||
lines[i].special == Teleport_ZombieChanger ||
lines[i].special == Teleport_Line) &&
AM_drawMline(&l, SecretWallColor);
else
AM_drawMline(&l, WallColor);
} else if (lines[i].locknumber > 0) { // [Dusk] specials w/ locknumbers
lock = lines[i].locknumber;
color = P_GetMapColorForLock(lock);
AMColor c;
if (color >= 0) c.FromRGB(RPART(color), GPART(color), BPART(color));
else c = LockedColor;
AM_drawMline (&l, c);
} else if ((lines[i].special == Teleport ||
lines[i].special == Teleport_NoFog ||
lines[i].special == Teleport_ZombieChanger ||
lines[i].special == Teleport_Line) &&
(lines[i].activation & SPAC_PlayerActivate) &&
am_colorset == 0)
{ // intra-level teleporters
@ -1975,19 +1984,18 @@ void AM_drawWalls (bool allmap)
(lines[i].special == Door_Animated && lines[i].args[3] != 0) ||
(lines[i].special == Generic_Door && lines[i].args[4] != 0))
{
if (am_colorset == 0 || am_colorset == 3) // Raven games show door colors
{
int P_GetMapColorForLock(int lock);
int lock;
if (lines[i].special==Door_LockedRaise || lines[i].special==Door_Animated)
lock=lines[i].args[3];
else lock=lines[i].args[4];
int color = P_GetMapColorForLock(lock);
AMColor c;
if (am_colorset == 0 || am_colorset == 3) // Raven games show door colors
{
int P_GetMapColorForLock(int lock);
if (lines[i].special==Door_LockedRaise || lines[i].special==Door_Animated)
lock=lines[i].args[3];
else lock=lines[i].args[4];
color = P_GetMapColorForLock(lock);
AMColor c;
if (color >= 0) c.FromRGB(RPART(color), GPART(color), BPART(color));
else c = LockedColor;

View File

@ -379,12 +379,13 @@ xx(Midtex3d)
xx(Checkswitchrange)
xx(Firstsideonly)
xx(Transparent)
xx(Passuse)
xx(Repeatspecial)
xx(Conversation)
xx(Playercross)
xx(Playeruse)
xx(Passuse)
xx(Repeatspecial)
xx(Conversation)
xx(Locknumber)
xx(Playercross)
xx(Playeruse)
xx(Playeruseback)
xx(Monstercross)
xx(Impact)

View File

@ -57,12 +57,13 @@
#include "gi.h"
#include "statnums.h"
#include "g_level.h"
#include "v_font.h"
#include "a_sharedglobal.h"
#include "farchive.h"
// State.
#include "r_state.h"
#include "v_font.h"
#include "a_sharedglobal.h"
#include "farchive.h"
#include "a_keys.h"
// State.
#include "r_state.h"
#include "c_console.h"
@ -232,12 +233,14 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
BYTE special;
if (!P_TestActivateLine (line, mo, side, activationType))
{
return false;
}
lineActivation = line->activation;
repeat = line->flags & ML_REPEAT_SPECIAL;
buttonSuccess = false;
{
return false;
}
int remote = (line->special != 7 && line->special != 8 && (line->special < 11 || line->special > 14));
if (line->locknumber > 0 && !P_CheckKeys (mo, line->locknumber, remote)) return false;
lineActivation = line->activation;
repeat = line->flags & ML_REPEAT_SPECIAL;
buttonSuccess = false;
buttonSuccess = P_ExecuteSpecial(line->special,
line, mo, side == 1, line->args[0],
line->args[1], line->args[2],

View File

@ -877,12 +877,17 @@ public:
Flag(ld->flags, ML_BLOCKUSE, key);
continue;
case NAME_blocksight:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
default:
break;
case NAME_blocksight:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
// [Dusk] lock number
case NAME_Locknumber:
ld->locknumber = CheckInt(key);
continue;
default:
break;
}
if (!strnicmp("user_", key.GetChars(), 5))

View File

@ -907,12 +907,13 @@ struct line_t
side_t *sidedef[2];
//DWORD sidenum[2]; // sidenum[1] will be NO_SIDE if one sided
fixed_t bbox[4]; // bounding box, for the extent of the LineDef.
slopetype_t slopetype; // To aid move clipping.
sector_t *frontsector, *backsector;
int validcount; // if == validcount, already checked
};
// phares 3/14/98
slopetype_t slopetype; // To aid move clipping.
sector_t *frontsector, *backsector;
int validcount; // if == validcount, already checked
int locknumber; // [Dusk] lock number for special
};
// phares 3/14/98
//
// Sector list node showing all sectors an object appears in.
//