- 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

@ -1916,6 +1916,7 @@ void AM_drawWalls (bool allmap)
{
int i;
static mline_t l;
int lock, color;
for (i = 0; i < numlines; i++)
{
@ -1951,8 +1952,16 @@ void AM_drawWalls (bool allmap)
AM_drawMline(&l, SecretWallColor);
else
AM_drawMline(&l, WallColor);
}
else if ((lines[i].special == Teleport ||
} 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) &&
@ -1978,13 +1987,12 @@ void AM_drawWalls (bool allmap)
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);
color = P_GetMapColorForLock(lock);
AMColor c;

View File

@ -382,6 +382,7 @@ xx(Transparent)
xx(Passuse)
xx(Repeatspecial)
xx(Conversation)
xx(Locknumber)
xx(Playercross)
xx(Playeruse)

View File

@ -60,6 +60,7 @@
#include "v_font.h"
#include "a_sharedglobal.h"
#include "farchive.h"
#include "a_keys.h"
// State.
#include "r_state.h"
@ -235,6 +236,8 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
{
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;

View File

@ -881,6 +881,11 @@ public:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
// [Dusk] lock number
case NAME_Locknumber:
ld->locknumber = CheckInt(key);
continue;
default:
break;
}

View File

@ -910,6 +910,7 @@ struct line_t
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