Add linedef executor for toggling stagefailed

By default, the executor will fail the stage. If Not Climbable is checked, the stage can be completed normally again.
This commit is contained in:
Sally Coolatta 2021-04-19 17:20:34 -04:00
parent d59f25a6cd
commit d8d3dee46f
2 changed files with 16 additions and 1 deletions

View file

@ -3395,7 +3395,7 @@ static void P_InitLevelSettings(void)
ssspheres = timeinmap = 0;
// Assume Special Stages were failed in unless proven otherwise - via P_GiveEmerald or emerald touchspecial
// Normal stages will default to be OK, unless a Lua script sets to false.
// Normal stages will default to be OK, until a Lua script / linedef executor says otherwise.
stagefailed = G_IsSpecialStage(gamemap);
// Reset temporary record data

View file

@ -3902,6 +3902,21 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
break;
case 466: // Set level failure state
{
if (line->flags & ML_NOCLIMB)
{
stagefailed = false;
CONS_Debug(DBG_GAMELOGIC, "Stage can be completed successfully!\n");
}
else
{
stagefailed = true;
CONS_Debug(DBG_GAMELOGIC, "Stage will end in failure...\n");
}
}
break;
case 480: // Polyobj_DoorSlide
case 481: // Polyobj_DoorSwing
PolyDoor(line);