mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-22 09:11:21 +00:00
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:
parent
d59f25a6cd
commit
d8d3dee46f
2 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
15
src/p_spec.c
15
src/p_spec.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue