mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Handle locknumber in boundary checks, check for FS_Execute
This commit is contained in:
parent
2f027504b6
commit
67a7f48ca3
1 changed files with 37 additions and 19 deletions
|
@ -2323,21 +2323,50 @@ bool AM_isTriggerBoundary (line_t& line)
|
||||||
|
|
||||||
bool AM_isLockSpecial (int special, int* args)
|
bool AM_isLockSpecial (int special, int* args)
|
||||||
{
|
{
|
||||||
return special == Door_LockedRaise ||
|
return special == Door_LockedRaise
|
||||||
special == ACS_LockedExecute ||
|
|| special == ACS_LockedExecute
|
||||||
special == ACS_LockedExecuteDoor ||
|
|| special == ACS_LockedExecuteDoor
|
||||||
(special == Door_Animated && args[3] != 0) ||
|
|| (special == Door_Animated && args[3] != 0)
|
||||||
(special == Generic_Door && args[4] != 0);
|
|| (special == Generic_Door && args[4] != 0)
|
||||||
|
|| (special == FS_Execute && args[2] != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AM_isLockBoundary (line_t &line, int *lockptr = NULL)
|
bool AM_isLockBoundary (line_t &line, int *lockptr = NULL)
|
||||||
{
|
{
|
||||||
|
if (lockptr == NULL)
|
||||||
|
{
|
||||||
|
static int sink;
|
||||||
|
lockptr = &sink;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.locknumber)
|
||||||
|
{
|
||||||
|
*lockptr = line.locknumber;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int special;
|
int special;
|
||||||
int *args;
|
int *args;
|
||||||
bool result = AM_checkSpecialBoundary(line, &AM_isLockSpecial, &special, &args);
|
bool result = AM_checkSpecialBoundary(line, &AM_isLockSpecial, &special, &args);
|
||||||
|
|
||||||
if (lockptr && result)
|
if (result)
|
||||||
*lockptr = (special==Door_LockedRaise || special==Door_Animated) ? args[3] : args[4];
|
{
|
||||||
|
switch (special)
|
||||||
|
{
|
||||||
|
case FS_Execute:
|
||||||
|
*lockptr = args[2];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Door_Animated:
|
||||||
|
case Door_LockedRaise:
|
||||||
|
*lockptr = args[3];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
*lockptr = args[4];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -2390,17 +2419,6 @@ void AM_drawWalls (bool allmap)
|
||||||
else
|
else
|
||||||
AM_drawMline(&l, AMColors.WallColor);
|
AM_drawMline(&l, AMColors.WallColor);
|
||||||
}
|
}
|
||||||
else if (lines[i].locknumber > 0 && AMColors.displayLocks)
|
|
||||||
{ // [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 = AMColors[AMColors.LockedColor];
|
|
||||||
|
|
||||||
AM_drawMline (&l, c);
|
|
||||||
}
|
|
||||||
else if (AM_isTeleportBoundary(lines[i]) && AMColors.isValid(AMColors.IntraTeleportColor))
|
else if (AM_isTeleportBoundary(lines[i]) && AMColors.isValid(AMColors.IntraTeleportColor))
|
||||||
{ // intra-level teleporters
|
{ // intra-level teleporters
|
||||||
AM_drawMline(&l, AMColors.IntraTeleportColor);
|
AM_drawMline(&l, AMColors.IntraTeleportColor);
|
||||||
|
|
Loading…
Reference in a new issue