- reinstated the old scriptwait implementation as a compatibility option.

Daedalus's MAP19 needs this.
This commit is contained in:
Christoph Oelckers 2019-09-07 09:34:50 +02:00
parent e6d39254b7
commit cbd4479628
5 changed files with 24 additions and 4 deletions

View file

@ -338,6 +338,7 @@ enum : unsigned int
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout. COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout.
COMPATF2_RAILING = 1 << 10, // Bugged Strife railings. 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 // 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_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_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_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: // phares 3/20/98:

View file

@ -1685,6 +1685,7 @@ MapFlagHandlers[] =
{ "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 }, { "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 },
{ "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 }, { "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 },
{ "compat_railing", MITYPE_COMPATFLAG, 0, COMPATF2_RAILING }, { "compat_railing", MITYPE_COMPATFLAG, 0, COMPATF2_RAILING },
{ "compat_scriptwait", MITYPE_COMPATFLAG, 0, COMPATF2_SCRIPTWAIT },
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_start_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 },

View file

@ -169,6 +169,7 @@ static FCompatOption Options[] =
{ "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 }, { "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 },
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 }, { "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
{ "railing", COMPATF2_RAILING, SLOT_COMPAT2 }, { "railing", COMPATF2_RAILING, SLOT_COMPAT2 },
{ "scriptwait", COMPATF2_SCRIPTWAIT, SLOT_COMPAT2 },
{ NULL, 0, 0 } { NULL, 0, 0 }
}; };

View file

@ -8308,9 +8308,21 @@ scriptwait:
break; break;
case PCD_SCRIPTWAITDIRECT: case PCD_SCRIPTWAITDIRECT:
statedata = uallong(pc[0]); if (!(Level->i_compatflags2 & COMPATF2_SCRIPTWAIT))
pc++; {
goto 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: case PCD_SCRIPTWAITNAMED:
statedata = -FName(Level->Behaviors.LookupString(STACK(1))); statedata = -FName(Level->Behaviors.LookupString(STACK(1)));

View file

@ -287,3 +287,8 @@ DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05
clipmidtex clipmidtex
checkswitchrange checkswitchrange
} }
F50C91A05E1A1E646690517641F0D1DD // daedalus.wad map19
{
scriptwait
}