mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- 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:
parent
774955dbc4
commit
cc5bff6c9c
2 changed files with 29 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
@ -784,6 +784,8 @@ struct LevelLocals native
|
|||
native play bool CreateCeiling(sector sec, int type, line ln, double speed, double speed2, double height = 0, int crush = -1, int silent = 0, int change = 0, int crushmode = 0 /*Floor.crushDoom*/);
|
||||
native play bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false);
|
||||
|
||||
native void ExitLevel(int position, bool keepFacing);
|
||||
native void SecretExitLevel(int position);
|
||||
}
|
||||
|
||||
struct StringTable native
|
||||
|
|
Loading…
Reference in a new issue