mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Added REOPEN script type. These scripts behave just like OPEN scripts, except they will re-execute themselves every time the level is re-entered (ie as part of a hub).
This commit is contained in:
parent
715aa80cf2
commit
a49e15c541
3 changed files with 6 additions and 1 deletions
|
@ -1291,6 +1291,9 @@ void G_FinishTravel ()
|
|||
if (level.FromSnapshot)
|
||||
{
|
||||
FBehavior::StaticStartTypedScripts (SCRIPT_Return, pawn, true);
|
||||
|
||||
// [Nash] run REOPEN scripts upon map re-entry
|
||||
FBehavior::StaticStartTypedScripts(SCRIPT_Reopen, NULL, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2822,7 +2822,8 @@ void FBehavior::StaticStartTypedScripts (WORD type, AActor *activator, bool alwa
|
|||
"Lightning",
|
||||
"Unloading",
|
||||
"Disconnect",
|
||||
"Return"
|
||||
"Return",
|
||||
"Reopen"
|
||||
};
|
||||
DPrintf(DMSG_NOTIFY, "Starting all scripts of type %d (%s)\n", type,
|
||||
type < countof(TypeNames) ? TypeNames[type] : TypeNames[SCRIPT_Lightning - 1]);
|
||||
|
|
|
@ -272,6 +272,7 @@ enum
|
|||
SCRIPT_Return = 15,
|
||||
SCRIPT_Event = 16, // [BB]
|
||||
SCRIPT_Kill = 17, // [JM]
|
||||
SCRIPT_Reopen = 18, // [Nash]
|
||||
};
|
||||
|
||||
// Script flags
|
||||
|
|
Loading…
Reference in a new issue