diff --git a/src/doomdef.h b/src/doomdef.h index 9c8197e07..e28206b08 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -338,6 +338,7 @@ enum : unsigned int COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout. COMPATF2_RAILING = 1 << 10, // Bugged Strife railings. + COMPATF2_SCRIPTWAIT = 1 << 11, // Use old scriptwait implementation where it doesn't wait on a non-running script. }; // Emulate old bugs for select maps. These are not exposed by a cvar @@ -353,7 +354,7 @@ enum BCOMPATF_LINKFROZENPROPS = 1 << 6, // Clearing PROP_TOTALLYFROZEN or PROP_FROZEN also clears the other BCOMPATF_FLOATBOB = 1 << 8, // Use Hexen's original method of preventing floatbobbing items from falling down BCOMPATF_NOSLOPEID = 1 << 9, // disable line IDs on slopes. - BCOMPATF_CLIPMIDTEX = 1 << 10, // Always Clip midtex's in the software renderer (required to run certain GZDoom maps) + BCOMPATF_CLIPMIDTEX = 1 << 10, // Always Clip midtex's in the software renderer (required to run certain GZDoom maps, has no effect in the hardware renderer) }; // phares 3/20/98: diff --git a/src/gamedata/g_mapinfo.cpp b/src/gamedata/g_mapinfo.cpp index bb6138687..f4c059105 100644 --- a/src/gamedata/g_mapinfo.cpp +++ b/src/gamedata/g_mapinfo.cpp @@ -1685,6 +1685,7 @@ MapFlagHandlers[] = { "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 }, { "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 }, { "compat_railing", MITYPE_COMPATFLAG, 0, COMPATF2_RAILING }, + { "compat_scriptwait", MITYPE_COMPATFLAG, 0, COMPATF2_SCRIPTWAIT }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, diff --git a/src/maploader/compatibility.cpp b/src/maploader/compatibility.cpp index bf9d389c7..5b23b51be 100644 --- a/src/maploader/compatibility.cpp +++ b/src/maploader/compatibility.cpp @@ -169,6 +169,7 @@ static FCompatOption Options[] = { "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 }, { "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 }, { "railing", COMPATF2_RAILING, SLOT_COMPAT2 }, + { "scriptwait", COMPATF2_SCRIPTWAIT, SLOT_COMPAT2 }, { NULL, 0, 0 } }; diff --git a/src/playsim/p_acs.cpp b/src/playsim/p_acs.cpp index 0cb77f19e..46cb8191e 100644 --- a/src/playsim/p_acs.cpp +++ b/src/playsim/p_acs.cpp @@ -8308,9 +8308,21 @@ scriptwait: break; case PCD_SCRIPTWAITDIRECT: - statedata = uallong(pc[0]); - pc++; - goto scriptwait; + if (!(Level->i_compatflags2 & COMPATF2_SCRIPTWAIT)) + { + statedata = uallong(pc[0]); + pc++; + goto scriptwait; + } + else + { + // Old implementation for compatibility with Daedalus MAP19 + state = SCRIPT_ScriptWait; + statedata = uallong(pc[0]); + pc++; + PutLast(); + break; + } case PCD_SCRIPTWAITNAMED: statedata = -FName(Level->Behaviors.LookupString(STACK(1))); diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 1c2c4104b..e534146ef 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -287,3 +287,8 @@ DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05 clipmidtex checkswitchrange } + +F50C91A05E1A1E646690517641F0D1DD // daedalus.wad map19 +{ + scriptwait +}