Skip to content

Add compat_checkrunawayscript #2486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/d_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ CVAR (Flag, compat_railing, compatflags2, COMPATF2_RAILING);
CVAR (Flag, compat_avoidhazard, compatflags2, COMPATF2_AVOID_HAZARDS);
CVAR (Flag, compat_stayonlift, compatflags2, COMPATF2_STAYONLIFT);
CVAR (Flag, compat_nombf21, compatflags2, COMPATF2_NOMBF21);
CVAR (Flag, compat_checkrunawayscript, compatflags2, COMPATF2_CHECKRUNAWAYSCRIPT);

CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

Expand Down Expand Up @@ -4029,4 +4030,4 @@ CCMD(type)
auto data = fileSystem.ReadFile(lump);
Printf("%.*s\n", data.size(), data.string());
}
}
}
1 change: 1 addition & 0 deletions src/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ enum : unsigned int
COMPATF2_STAYONLIFT = 1 << 13, // yet another MBF thing.
COMPATF2_NOMBF21 = 1 << 14, // disable MBF21 features that may clash with certain maps
COMPATF2_VOODOO_ZOMBIES = 1 << 15, // [RL0] allow playerinfo, playerpawn, and voodoo health to all be different, and skip killing the player's mobj if a voodoo doll dies to allow voodoo zombies
COMPATF2_CHECKRUNAWAYSCRIPT = 1 << 16, // [TDRR] re-enables ACS script instruction limit

};

Expand Down
2 changes: 1 addition & 1 deletion src/playsim/p_acs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6964,7 +6964,7 @@ int DLevelScript::RunScript()

while (state == SCRIPT_Running)
{
if (++runaway > 2000000)
if ((++runaway > 2000000) && (Level->i_compatflags2 & COMPATF2_CHECKRUNAWAYSCRIPT))
{
Printf ("Runaway %s terminated\n", ScriptPresentation(script).GetChars());
state = SCRIPT_PleaseRemove;
Expand Down
Loading
Loading