Sigil 2 (v1.0) and Eviternity 2 (RC5) support.

+ Invinciball activation now voiced by Demo (thanks, Vyolette).
+ Retooled exit line merging (should fix those pesky duplicate exit markers).

Note: Oneliners for the Eviternity 2 final boss are not voiced yet.
This commit is contained in:
Mari the Deer 2024-01-04 19:50:26 +01:00
commit cbb1b2a8cb
36 changed files with 1177 additions and 165 deletions

View file

@ -65,7 +65,19 @@ extend Class SWWMHandler
{
int clust = 0;
bool secret = false;
if ( SWWMUtility.IsEviternity() )
if ( SWWMUtility.IsEviternityTwo() )
{
// clusters have to be remapped here
let clus = level.cluster;
if ( clus == 5 ) clust = 1;
else if ( (clus == 6) || (clus == 13) ) clust = 2;
else if ( (clus == 7) || (clus == 14) ) clust = 3;
else if ( (clus == 8) || (clus == 15) ) clust = 4;
else if ( (clus == 9) || (clus == 16) ) clust = 5;
else if ( (clus == 10) || (clus == 17) ) clust = 6;
else if ( (clus == 11) || (clus == 12) || (clus == 18) || (clus == 19) ) clust = 7;
}
else if ( SWWMUtility.IsEviternity() )
{
// we have to do some heavy lifting here because episodes don't match clusters
if ( level.levelnum <= 5 ) clust = 1;
@ -270,6 +282,9 @@ extend Class SWWMHandler
case MAP_EVMAP30:
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EVIA");
break;
case MAP_EVIIMAP30:
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2K");
break;
case MAP_HE1M8_HE4M8:
if ( level.mapname ~== "E1M8" ) SendInterfaceEvent(consoleplayer,"swwmsetdialogue.MAW");
else SendInterfaceEvent(consoleplayer,"swwmsetdialogue.HEADS");
@ -309,6 +324,9 @@ extend Class SWWMHandler
|| (csum ~== "09B30C9DA9D73D3D5A709502FBB947AA")
|| (csum ~== "6EAD80DA1F30B4B3546FA294EEF9F87C") )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.SIGIL");
// SIGIL 2 E6M8
if ( csum ~== "5BA3D00F6B64F6268E11C6851D47ECBF" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.SIGIL2");
// Doom 2 MAP11
else if ( (csum ~== "73D9E03CEE7BF1A97EFD2EAD86688EF8")
|| (csum ~== "F4F2A769609988837458772AAE99008C")
@ -334,6 +352,28 @@ extend Class SWWMHandler
// MAP25
else if ( csum ~== "196BC735473C593F924A59B238574C35" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.SLA");
// Eviternity 2 (RC5)
// MAP01
else if ( csum ~== "3907915FEC75DEE3A53374D90C4F4B65" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2A");
// MAP05
else if ( csum ~== "58A6A5A8214B0C2C28C9DADC349F2853" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2E");
// MAP10
else if ( csum ~== "9525AF4F176085C925124CF118E91DF1" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2F");
// MAP15
else if ( csum ~== "24EFC6868344643D3D4C56BDF2D1E8C7" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2G");
// MAP20
else if ( csum ~== "81B7BDE4BD0E98A9B8741B0405FAB839" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2H");
// MAP25
else if ( csum ~== "56A3EB18F91B2AE42DCF327888AEAA0A" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2I");
// MAP33
else if ( csum ~== "043FE06534270E95882CA128AF7B0402" )
SendInterfaceEvent(consoleplayer,"swwmsetdialogue.EV2P");
// Deathkings
// Blight
else if ( csum ~== "E3EFB0156A20ADF2DF00915A0EA85DF5" )
@ -425,9 +465,10 @@ extend Class SWWMHandler
allclearsector = 18414; // only check all-clear if the player is standing in this sector
gdat.disablerevive = true; // ONE TRY
}
// for skipping over merged exit lines (sharing vertices)
Array<Line> skipme;
skipme.Clear();
Array<Line> exits;
Array<int> exittypes;
exits.Clear();
exittypes.Clear();
// find exit lines, and use lines that aren't exits
foreach ( l:level.Lines )
{
@ -442,68 +483,51 @@ extend Class SWWMHandler
}
let [isexit, exittype] = SWWMUtility.IsExitLine(l);
if ( !isexit ) continue;
exits.Push(l);
exittypes.Push(exittype);
}
// for skipping over merged exit lines (sharing vertices)
Array<Line> skipme;
skipme.Clear();
for ( int i=0; i<exits.Size(); i++ )
{
let l = exits[i];
if ( skipme.Find(l) < skipme.Size() ) continue;
skipme.Push(l);
// look for connected lines
// only stop once we cannot find more
Array<Line> con;
con.Clear();
con.Push(l);
int found;
if ( l.frontsector )
do
{
do
found = 0;
for ( int j=0; j<exits.Size(); j++ )
{
found = 0;
foreach ( l2:l.frontsector.Lines )
let l2 = exits[j];
if ( (l2 == l) || !SWWMUtility.SameSpecial(l,l2) || (skipme.Find(l2) < skipme.Size()) || (con.Find(l2) < con.size()) ) continue;
// needs to have at least one point in common with this one or any of the added lines
bool nomatches = true;
foreach ( c:con )
{
if ( (l2.special != l.special) || (con.Find(l2) < con.Size()) ) continue;
// needs to have a point in common with this one or any of the added lines
bool nomatches = true;
foreach ( c:con )
{
if ( (l2.v1 != c.v1) && (l2.v2 != c.v2) && (l2.v1 != c.v2) && (l2.v2 != c.v1) )
continue;
nomatches = false;
break;
}
if ( nomatches ) continue;
skipme.Push(l2);
con.Push(l2);
found++;
if ( (l2.v1.p != c.v1.p) && (l2.v2.p != c.v2.p) && (l2.v1.p != c.v2.p) && (l2.v2.p != c.v1.p) )
continue;
nomatches = false;
break;
}
if ( nomatches ) continue;
found++;
skipme.Push(l2);
con.Push(l2);
}
while ( found > 0 );
}
if ( l.backsector )
{
do
{
found = 0;
foreach ( l2:l.backsector.Lines )
{
if ( (l2.special != l.special) || (con.Find(l2) < con.Size()) ) continue;
// needs to have a point in common with this one or any of the added lines
bool nomatches = true;
foreach ( s:skipme )
{
if ( (l2.v1 != s.v1) && (l2.v2 != s.v2) && (l2.v1 != s.v2) && (l2.v2 != s.v1) )
continue;
nomatches = false;
break;
}
if ( nomatches ) continue;
skipme.Push(l2);
con.Push(l2);
found++;
}
}
while ( found > 0 );
}
while ( found > 0 );
Vector3 lpos = (0,0,0);
foreach ( c:con )
lpos += SWWMUtility.UseLinePos(c);
lpos /= con.Size();
SWWMInterest.Spawn(self,lpos,theline:l,theexit:exittype);
SWWMInterest.Spawn(self,lpos,theline:l,theexit:exittypes[i]);
}
// spawn loot
if ( !deathmatch ) Chancebox.SpawnChanceboxes();