- exported unconditional level exit to ZScript

Exit_Normal and Exit_Secret specials imply addition conditions to make a decision about proceeding to the next map
A few scriptified actors require a bypass of these conditions in order to work properly
This commit is contained in:
alexey.lysiuk 2019-06-16 13:29:33 +03:00 committed by drfrag
parent 53f08d27d6
commit 8735dd18ad
2 changed files with 20 additions and 0 deletions

View file

@ -708,12 +708,29 @@ void G_ExitLevel (int position, bool keepFacing)
G_ChangeLevel(G_GetExitMap(), position, keepFacing ? CHANGELEVEL_KEEPFACING : 0);
}
DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, ExitLevel, G_ExitLevel)
{
PARAM_PROLOGUE;
PARAM_INT(position);
PARAM_INT(keepFacing);
G_ExitLevel(position, keepFacing);
return 0;
}
void G_SecretExitLevel (int position)
{
level.flags3 |= LEVEL3_EXITSECRETUSED;
G_ChangeLevel(G_GetSecretExitMap(), position, 0);
}
DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, SecretExitLevel, G_SecretExitLevel)
{
PARAM_PROLOGUE;
PARAM_INT(position);
G_SecretExitLevel(position);
return 0;
}
//==========================================================================
//
//

View file

@ -753,6 +753,9 @@ struct LevelLocals native
{
return Floor.CreateFloor(sec, floortype, ln, speed, height, crush, change, crushmode, hereticlower);
}
native static void ExitLevel(int position, bool keepFacing);
native static void SecretExitLevel(int position);
}
struct StringTable native