Skip to content
Permalink
Browse files

- reinstated the old scriptwait implementation as a compatibility opt…

…ion.

Daedalus's MAP19 needs this.
  • Loading branch information...
coelckers committed Sep 7, 2019
1 parent e6d3925 commit cbd44796281ab776819da051481ea27de4932ae7
Showing with 24 additions and 4 deletions.
  1. +2 −1 src/doomdef.h
  2. +1 −0 src/gamedata/g_mapinfo.cpp
  3. +1 −0 src/maploader/compatibility.cpp
  4. +15 −3 src/playsim/p_acs.cpp
  5. +5 −0 wadsrc/static/compatibility.txt
@@ -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:
@@ -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 },
@@ -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 }
};

@@ -8308,9 +8308,21 @@ int DLevelScript::RunScript()
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)));
@@ -287,3 +287,8 @@ DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05
clipmidtex
checkswitchrange
}

F50C91A05E1A1E646690517641F0D1DD // daedalus.wad map19
{
scriptwait
}

0 comments on commit cbd4479

Please sign in to comment.
You can’t perform that action at this time.