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

View file

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

View file

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

View file

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

View file

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