- 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 Christoph Oelckers
commit cc5bff6c9c
2 changed files with 29 additions and 0 deletions

View file

@ -744,12 +744,39 @@ void FLevelLocals::ExitLevel (int position, bool keepFacing)
ChangeLevel(NextMap, position, keepFacing ? CHANGELEVEL_KEEPFACING : 0);
}
static void LevelLocals_ExitLevel(FLevelLocals *self, int position, bool keepFacing)
{
self->ExitLevel(position, keepFacing);
}
DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, ExitLevel, LevelLocals_ExitLevel)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(position);
PARAM_INT(keepFacing);
self->ExitLevel(position, keepFacing);
return 0;
}
void FLevelLocals::SecretExitLevel (int position)
{
flags3 |= LEVEL3_EXITSECRETUSED;
ChangeLevel(GetSecretExitMap(), position, 0);
}
static void LevelLocals_SecretExitLevel(FLevelLocals *self, int position)
{
self->SecretExitLevel(position);
}
DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, SecretExitLevel, LevelLocals_SecretExitLevel)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(position);
self->SecretExitLevel(position);
return 0;
}
//==========================================================================
//
//