- 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
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;