Vanilla doom/heretic episode interconnectedness (includes wadsmoosh support).
This commit is contained in:
parent
345d9e25bb
commit
2ab8115b39
12 changed files with 177 additions and 10 deletions
|
|
@ -63,6 +63,79 @@ Class SWWMLevelCompatibility : LevelPostProcessor
|
|||
OffsetSectorPlane(155,1,-80.);
|
||||
SetLineSpecial(652,ACS_Execute,-Int('NERVE_EXITOPEN'));
|
||||
break;
|
||||
// Doom E1M8
|
||||
case '97079958C7E89C1908890730B8B9FEB7':
|
||||
// 1.1-1.2
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E2M1";
|
||||
// no damage in exit sector
|
||||
SetSectorSpecial(13,0);
|
||||
// teleport sequence
|
||||
for ( int i=299; i<=306; i++ )
|
||||
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
|
||||
// remove enemies
|
||||
for ( int i=106; i<=112; i++ )
|
||||
SetThingEdNum(i,0);
|
||||
for ( int i=118; i<=125; i++ )
|
||||
SetThingEdNum(i,0);
|
||||
break;
|
||||
case '058FB092EA1B70DA1E3CBF501C4A91A1':
|
||||
// 1.666-1.9
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E2M1";
|
||||
// no damage in exit sector
|
||||
SetSectorSpecial(66,0);
|
||||
// teleport sequence
|
||||
for ( int i=299; i<=306; i++ )
|
||||
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
|
||||
// remove enemies
|
||||
for ( int i=106; i<=112; i++ )
|
||||
SetThingEdNum(i,0);
|
||||
for ( int i=118; i<=125; i++ )
|
||||
SetThingEdNum(i,0);
|
||||
break;
|
||||
// Doom E2M8
|
||||
case 'EFFE91DF41AD41F6973C06F0AD67DDB9':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E3M1";
|
||||
break;
|
||||
// Doom E3M8
|
||||
case 'EF128313112110ED6C1549AF96AF26C9':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
if ( Wads.FindLump("M_EPI4",0,1) != -1 ) level.nextmap = "E4M1";
|
||||
else if ( Wads.FindLump("M_HELL",0,1) != -1 ) level.nextmap = "MAP01";
|
||||
break;
|
||||
// Doom E4M8
|
||||
case '2DC939E508AB8EB68AF79D5B60568711':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
if ( Wads.FindLump("M_EPI5",0,1) != -1 ) level.nextmap = "E5M1";
|
||||
else if ( Wads.FindLump("M_HELL",0,1) != -1 ) level.nextmap = "MAP01";
|
||||
break;
|
||||
// SIGIL E5M8
|
||||
case '6EAD80DA1F30B4B3546FA294EEF9F87C':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
if ( Wads.FindLump("M_HELL",0,1) != -1 ) level.nextmap = "MAP01";
|
||||
break;
|
||||
// Heretic E1M8
|
||||
case '27639D04F8090D57A47D354992435893':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E2M1";
|
||||
break;
|
||||
// Heretic E2M8
|
||||
case '5158C22A0F30CE5E558FD2A05D67685E':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E3M1";
|
||||
break;
|
||||
// Heretic E3M8
|
||||
case '4719C2C71EF28F52310B889DD5A9778B':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
if ( Wads.FindLump("EXTENDED",0,1) != -1 ) level.nextmap = "E4M1";
|
||||
break;
|
||||
// Heretic E4M8
|
||||
case '30D1480A6D4F3A3153739D4CCF659C4E':
|
||||
level.nextsecretmap = level.nextmap; // so the handler can detect this
|
||||
level.nextmap = "E5M1";
|
||||
break;
|
||||
// Micro Slaughter Community Project MAP13
|
||||
case 'E45AA3BE411845AA0DEE7CA5DAAB65FE':
|
||||
// reduce OBSCENELY EXCESSIVE number of cell packs in voodoo doll conveyors (400), which will cause immense lag when replaced with mod ammo
|
||||
|
|
|
|||
|
|
@ -824,6 +824,15 @@ Class SWWMHandler : EventHandler
|
|||
let c = SWWMCredits.Find(players[i]);
|
||||
if ( c ) c.credits = c.hcredits = 0;
|
||||
}
|
||||
// end of episode resets
|
||||
if ( level.nextsecretmap.Left(6) == "enDSeQ" )
|
||||
{
|
||||
for ( int i=0; i<MAXPLAYERS; i++ )
|
||||
{
|
||||
if ( !playeringame[i] || !players[i].mo ) continue;
|
||||
players[i].mo.GiveInventory("InventoryWipeToken",1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupLockdefsCache( SWWMCachedLockInfo cli )
|
||||
|
|
@ -1151,7 +1160,7 @@ Class SWWMHandler : EventHandler
|
|||
}
|
||||
// reset inventory (including unclearables) on forced pistol starts (must have visited at least one map, though)
|
||||
// known bug: the previous weapon will play its select sound regardless, this is ENTIRELY IMPOSSIBLE to fix
|
||||
if ( swwm_pistolstart && (s.lstats.Size() > 0) && ((s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB)) )
|
||||
if ( p.mo.FindInventory("InventoryWipeToken") || (swwm_pistolstart && (s.lstats.Size() > 0) && ((s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB))) )
|
||||
SWWMUtility.WipeInventory(p.mo,swwm_resetscore);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,8 +160,8 @@ Class DemolitionistMenu : GenericMenu
|
|||
else if ( level.levelnum <= 32 ) clus = 8;
|
||||
missionstr = String.Format("$SWWM_MISSION_EVITERNITY%d",clus);
|
||||
}
|
||||
// naive method to guess if this is sigil (also handle wadsmoosh, which uses cluster 25 instead)
|
||||
else if ( ((clus == 5) || (clus == 25)) && (level.mapname.Left(2) == "E5") )
|
||||
// naive method to guess if this is sigil
|
||||
else if ( (clus == 5) && (level.mapname.Left(2) == "E5") )
|
||||
missionstr = String.Format("$SWWM_MISSION_SIGIL");
|
||||
else missionstr = String.Format("$SWWM_MISSION_DOOM%d",clus);
|
||||
int csiz = stats.clustervisit.Size();
|
||||
|
|
@ -171,6 +171,17 @@ Class DemolitionistMenu : GenericMenu
|
|||
if ( !(StringTable.Localize(tmpstr) ~== tmpstr.Mid(1)) )
|
||||
missionstr = tmpstr;
|
||||
}
|
||||
// if we came from the doom 1 episodes, use the alt mission string for Doom 2
|
||||
bool fromdoomone = false;
|
||||
for ( int i=0; i<csiz; i++ )
|
||||
{
|
||||
// also include sigil
|
||||
if ( !eviternity && (stats.clustervisit[i] >= 5) && (stats.clustervisit[i] != 25) ) continue;
|
||||
fromdoomone = true;
|
||||
break;
|
||||
}
|
||||
if ( !eviternity && (clus == 5) && fromdoomone )
|
||||
missionstr = "$SWWM_MISSION_DOOM5_FROMDOOM1";
|
||||
if ( StringTable.Localize(missionstr) ~== missionstr.Mid(1) )
|
||||
missionstr = "$SWWM_MISSION_NONE";
|
||||
bool firstskip = false;
|
||||
|
|
@ -180,6 +191,8 @@ Class DemolitionistMenu : GenericMenu
|
|||
continue;
|
||||
firstskip = true;
|
||||
String xstr = String.Format(eviternity?"$SWWM_MISSION_EVITERNITY%d":"$SWWM_MISSION_DOOM%d",stats.clustervisit[i]);
|
||||
if ( !eviternity && (stats.clustervisit[i] == 5) && fromdoomone )
|
||||
xstr = "$SWWM_MISSION_DOOM5_FROMDOOM1";
|
||||
if ( stats.secretdone[i] )
|
||||
{
|
||||
String tmpstr = xstr.."_SECRET";
|
||||
|
|
|
|||
|
|
@ -178,6 +178,12 @@ Class SWWMUtility
|
|||
{
|
||||
if ( (l.special == Exit_Normal) || (l.special == Exit_Secret) || (l.special == Teleport_EndGame) || (l.special == Teleport_NewMap) )
|
||||
return true;
|
||||
// E1M8 compat
|
||||
if ( (l.special == ACS_Execute) && (l.Args[0] == -Int('E1M8_KNOCKOUT')) )
|
||||
return true;
|
||||
// spooktober™
|
||||
if ( ((l.special == ACS_Execute) || (l.special == ACS_ExecuteAlways)) && (l.Args[0] == -Int('MapFadeOut')) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1392,8 +1398,17 @@ Class SWWMUtility
|
|||
}
|
||||
|
||||
// full reset of inventory (excluding collectibles, and optionally resetting the score)
|
||||
static play void WipeInventory( Actor mo, bool resetscore = false )
|
||||
static play void WipeInventory( Actor mo, bool resetscore = false, bool allplayers = false )
|
||||
{
|
||||
if ( allplayers )
|
||||
{
|
||||
for ( int i=0; i<MAXPLAYERS; i++ )
|
||||
{
|
||||
if ( !playeringame[i] || !players[i].mo ) continue;
|
||||
WipeInventory(players[i].mo,resetscore,false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
PlayerInfo p = mo.player;
|
||||
if ( !p || !p.mo ) return;
|
||||
SWWMCredits c = SWWMCredits.Find(p);
|
||||
|
|
@ -1414,6 +1429,12 @@ Class SWWMUtility
|
|||
p.health = p.mo.Health = p.mo.SpawnHealth();
|
||||
}
|
||||
|
||||
// WHACK
|
||||
static play void EndLevelDie( Actor victim )
|
||||
{
|
||||
victim.DamageMobj(null,null,victim.Health,'EndLevel',DMG_FORCED|DMG_THRUSTLESS);
|
||||
}
|
||||
|
||||
// checks if we're playing in doom 1
|
||||
// this is used so we can sometimes replace the shotgun with a SSG slot weapon
|
||||
static bool IsDoomOne()
|
||||
|
|
@ -1599,3 +1620,14 @@ Class ShinemapDebugSphere : Actor
|
|||
Loop;
|
||||
}
|
||||
}
|
||||
|
||||
// used to indicate that the next level resets inventory
|
||||
Class InventoryWipeToken : Inventory
|
||||
{
|
||||
default
|
||||
{
|
||||
+INVENTORY.UNDROPPABLE;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
+INVENTORY.UNCLEARABLE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue