Eviternity compatibility (sort of).
More compatible cosmetic bossbrain. Some fixups.
This commit is contained in:
parent
5d51b18c3f
commit
9fcbb16267
17 changed files with 450 additions and 37 deletions
|
|
@ -144,6 +144,197 @@ Class SWWMDroppedKeen : Actor
|
|||
}
|
||||
}
|
||||
|
||||
Class SWWMBossBrainExpl : Actor
|
||||
{
|
||||
void A_Ignite()
|
||||
{
|
||||
A_QuakeEx(3,3,3,20,0,400,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollintensity:2.);
|
||||
A_StartSound("explodium/hit",CHAN_VOICE,CHANF_DEFAULT,.4,.5);
|
||||
Scale *= FRandom[ExploS](0.8,1.1);
|
||||
Scale.x *= RandomPick[ExploS](-1,1);
|
||||
Scale.y *= RandomPick[ExploS](-1,1);
|
||||
int numpt = Random[ExploS](8,16);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,6);
|
||||
let s = Spawn("SWWMSmoke",pos);
|
||||
s.vel = pvel;
|
||||
s.SetShade(Color(1,1,1)*Random[ExploS](64,224));
|
||||
s.special1 = Random[ExploS](1,4);
|
||||
s.scale *= 2.8;
|
||||
s.alpha *= .4;
|
||||
}
|
||||
numpt = Random[ExploS](5,10);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](2,12);
|
||||
let s = Spawn("SWWMSpark",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
numpt = Random[ExploS](10,15);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](2,24);
|
||||
let s = Spawn("SWWMChip",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
numpt = int(Random[ExploS](-1,2)+special1);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
let s = Spawn("SWWMBossBrainExplArm",pos);
|
||||
s.target = target;
|
||||
}
|
||||
}
|
||||
Default
|
||||
{
|
||||
RenderStyle "Add";
|
||||
Scale 2.5;
|
||||
Radius .1;
|
||||
Height 0.;
|
||||
+NOGRAVITY;
|
||||
+NOBLOCKMAP;
|
||||
+NOINTERACTION;
|
||||
+DONTSPLASH;
|
||||
+NOTELEPORT;
|
||||
+FORCEXYBILLBOARD;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A 10;
|
||||
TNT1 A 0 A_Ignite();
|
||||
XEX1 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] 1 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
Class SWWMBossBrainExplArm : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
PROJECTILE;
|
||||
+THRUACTORS;
|
||||
+BOUNCEONWALLS;
|
||||
+BOUNCEONFLOORS;
|
||||
+BOUNCEONCEILINGS;
|
||||
-NOGRAVITY;
|
||||
Gravity 0.35;
|
||||
BounceFactor 1.0;
|
||||
Radius 4;
|
||||
Height 4;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
reactiontime = Random[ExploS](10,15);
|
||||
double ang, pt;
|
||||
ang = FRandom[ExploS](0,360);
|
||||
pt = FRandom[ExploS](-90,90);
|
||||
vel = (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[ExploS](8.,20.);
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A 1
|
||||
{
|
||||
A_CountDown();
|
||||
Spawn("ExplodiumMagTrail",pos);
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,5);
|
||||
let s = Spawn("SWWMHalfSmoke",pos);
|
||||
s.vel = pvel+vel*.2;
|
||||
s.SetShade(Color(1,1,1)*Random[ExploS](64,224));
|
||||
s.special1 = Random[ExploS](1,3);
|
||||
s.scale *= 2.4;
|
||||
s.alpha *= 0.1+.4*(ReactionTime/15.);
|
||||
}
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
Class SWWMBossBrainPain : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
RenderStyle "Add";
|
||||
Radius .1;
|
||||
Height 0.;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
MBRN B 1 Bright A_FadeOut(.05);
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
Class SWWMBossBrain : BossBrain
|
||||
{
|
||||
bool eyeless;
|
||||
int smallcooldown;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
let ti = ThinkerIterator.Create("BossEye");
|
||||
if ( ti.Next() ) eyeless = false;
|
||||
else eyeless = true;
|
||||
}
|
||||
|
||||
void SpawnBrainExpl( bool death = false )
|
||||
{
|
||||
if ( death )
|
||||
{
|
||||
// big explosions throughout
|
||||
for ( int x=-350; x<=350; x+=5 )
|
||||
{
|
||||
let s = Spawn("SWWMBossBrainExpl",Vec2OffsetZ(x,-280,Random[BrainExplode](120,500)));
|
||||
s.tics = Random[BrainExplode](5,120);
|
||||
s.special1 = Random[BrainExplode](0,3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( level.maptime < smallcooldown ) return;
|
||||
smallcooldown = level.maptime+10;
|
||||
// small explosion on brain hole
|
||||
for ( int x=-40; x<=40; x+=10 )
|
||||
{
|
||||
let s = Spawn("SWWMBossBrainExpl",Vec2OffsetZ(x,-280,Random[BrainExplode](380,420)));
|
||||
s.tics = Random[BrainExplode](1,8);
|
||||
s.scale *= .5;
|
||||
}
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$FN_BOSSBRAIN";
|
||||
Radius 20;
|
||||
Height 40;
|
||||
+NOBLOOD;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
MBRN A -1;
|
||||
Stop;
|
||||
Pain:
|
||||
MBRN A 10
|
||||
{
|
||||
A_StartSound("brain/pain",CHAN_VOICE,attenuation:ATTN_NONE);
|
||||
A_QuakeEx(3,3,3,15,0,65535,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:.3);
|
||||
if ( !eyeless ) SpawnBrainExpl(false);
|
||||
Spawn("SWWMBossBrainPain",pos);
|
||||
}
|
||||
Goto Spawn;
|
||||
Death:
|
||||
MBRN A 120
|
||||
{
|
||||
A_StartSound("brain/death",CHAN_VOICE,attenuation:ATTN_NONE);
|
||||
A_QuakeEx(9,9,9,120,0,65535,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
|
||||
if ( !eyeless ) SpawnBrainExpl(true);
|
||||
Spawn("SWWMBossBrainPain",pos);
|
||||
}
|
||||
MBRN A -1 A_BrainDie();
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
// imitates UE1 light type LT_TexturePaletteOnce/LT_TexturePaletteLoop
|
||||
Class PaletteLight : PointLight
|
||||
{
|
||||
|
|
|
|||
|
|
@ -259,6 +259,7 @@ Class SWWMHandler : EventHandler
|
|||
MAP_HMAP37,
|
||||
MAP_HMAP38,
|
||||
MAP_HMAP40,
|
||||
MAP_EVMAP30 // eviternity
|
||||
};
|
||||
|
||||
private int WhichVanillaBossMap()
|
||||
|
|
@ -313,6 +314,8 @@ Class SWWMHandler : EventHandler
|
|||
|| (mapsum ~== "1C5DE5A921DEE405E98E7E09D9829387")
|
||||
|| (mapsum ~== "2A6C4235B942467D25FD50D5B313E67A") )
|
||||
return MAP_HMAP40;
|
||||
if ( mapsum ~== "5C5E5C08AF3572F31CF27318679F2B4E" )
|
||||
return MAP_EVMAP30;
|
||||
return MAP_NONE;
|
||||
}
|
||||
|
||||
|
|
@ -1455,6 +1458,9 @@ Class SWWMHandler : EventHandler
|
|||
// romero hax
|
||||
if ( (e.Thing is 'BossBrain') && (e.DamageType == 'Telefrag') )
|
||||
e.DamageSource.DamageMobj(null,null,Actor.TELEFRAG_DAMAGE,'EndLevel');
|
||||
// voodoo doll telefragging barrel hax (eviternity death exits)
|
||||
if ( (e.Thing is 'ExplosiveBarrel') && (e.DamageType == 'Telefrag') && e.DamageSource.player && (e.DamageSource.player.mo != e.DamageSource) )
|
||||
e.DamageSource.DamageMobj(null,null,Actor.TELEFRAG_DAMAGE,'EndLevel');
|
||||
if ( !e.Thing.player && !e.Thing.bIsMonster && !e.Thing.bCountKill && !(e.Thing is 'ScriptedMarine') ) return;
|
||||
DoKillScoring(e);
|
||||
}
|
||||
|
|
@ -1516,11 +1522,30 @@ Class SWWMHandler : EventHandler
|
|||
DoKeyTagFix(e.Thing);
|
||||
SWWMInterest.Spawn(thekey:Key(e.Thing));
|
||||
}
|
||||
else if ( e.Thing.GetClass() == 'BossBrain' )
|
||||
else if ( e.Thing.GetClass() == 'Pig' )
|
||||
e.Thing.SetTag("$FN_PIG"); // missing in gzdoom
|
||||
// eviternity stuff
|
||||
else if ( (e.Thing.GetClassName() == "Archangelus")
|
||||
|| (e.Thing.GetClassName() == "ArchangelusA")
|
||||
|| (e.Thing.GetClassName() == "ArchangelusB") )
|
||||
e.Thing.SetTag("$FN_ANGEL");
|
||||
else if ( e.Thing.GetClassName() == "AstralCaco" )
|
||||
e.Thing.SetTag("$FN_ASTRAL");
|
||||
else if ( e.Thing.GetClassName() == "Annihilator" )
|
||||
{
|
||||
e.Thing.SetTag("$FN_BOSSBRAIN");
|
||||
e.Thing.A_SetSize(20,40);
|
||||
e.Thing.bNOBLOOD = true;
|
||||
e.Thing.SetTag("$FN_ANNIHIL");
|
||||
// OH BOY, THESE AREN'T CHANGEABLE
|
||||
//e.Thing.Obituary = "$OB_ANNIHIL";
|
||||
}
|
||||
else if ( e.Thing.GetClassName() == "FormerCaptain" )
|
||||
{
|
||||
e.Thing.SetTag("$FN_FCAPTAIN");
|
||||
//e.Thing.Obituary = "$OB_FCAPTAIN";
|
||||
}
|
||||
else if ( e.Thing.GetClassName() == "NightmareDemon" )
|
||||
{
|
||||
e.Thing.SetTag("$FN_NDEMON");
|
||||
//e.Thing.Obituary = "$OB_NDEMON";
|
||||
}
|
||||
else if ( SWWMUtility.IdentifyingDog(e.Thing) || SWWMUtility.IdentifyingCaco(e.Thing)
|
||||
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
|
||||
|
|
@ -1529,8 +1554,9 @@ Class SWWMHandler : EventHandler
|
|||
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
|
||||
hp.target = e.Thing;
|
||||
}
|
||||
SWWMCombatTracker trk;
|
||||
if ( !swwm_notrack && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER) && !(e.Thing is 'LampMoth') && !(e.Thing is 'CompanionLamp') )
|
||||
SWWMCombatTracker.Spawn(e.Thing);
|
||||
trk = SWWMCombatTracker.Spawn(e.Thing);
|
||||
if ( !(e.Thing is 'LampMoth') && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER || e.Thing.bCORPSE || (e.Thing is 'Inventory') || (e.Thing is 'CompanionLamp')) )
|
||||
{
|
||||
if ( (swwm_shadows == 2) || ((swwm_shadows == 1) && ((e.Thing is 'Demolitionist') || (e.Thing.SpawnState.sprite == e.Thing.GetSpriteIndex('XZW1')))) )
|
||||
|
|
@ -1569,6 +1595,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 3;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_BRUISERS";
|
||||
}
|
||||
|
|
@ -1578,6 +1605,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 5;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_CYBIE";
|
||||
}
|
||||
|
|
@ -1587,6 +1615,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 6;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_SPIDER";
|
||||
}
|
||||
|
|
@ -1596,6 +1625,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 4;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_SPIDER2";
|
||||
}
|
||||
|
|
@ -1604,8 +1634,8 @@ Class SWWMHandler : EventHandler
|
|||
if ( (e.Thing is 'Fatso') || (e.Thing is 'Arachnotron') )
|
||||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe )
|
||||
e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_DIMPLE";
|
||||
}
|
||||
|
|
@ -1616,6 +1646,7 @@ Class SWWMHandler : EventHandler
|
|||
bossbrainactor = e.Thing;
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 40; // goodbye, instakills
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
if ( e.Thing is 'BossEye' )
|
||||
bossviewactor = e.Thing;
|
||||
|
|
@ -1627,6 +1658,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 4;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_LICHES";
|
||||
}
|
||||
|
|
@ -1636,6 +1668,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 3;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
}
|
||||
bosstag = "$BT_MINOTAUR";
|
||||
}
|
||||
|
|
@ -1645,6 +1678,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_DSPARIL";
|
||||
}
|
||||
else if ( e.Thing is 'Sorcerer2' )
|
||||
|
|
@ -1654,6 +1688,7 @@ Class SWWMHandler : EventHandler
|
|||
initialized = false;
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 8;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_DSPARIL2";
|
||||
}
|
||||
}
|
||||
|
|
@ -1663,6 +1698,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_CLERIC";
|
||||
}
|
||||
}
|
||||
|
|
@ -1672,6 +1708,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_FIGHTER";
|
||||
}
|
||||
}
|
||||
|
|
@ -1681,6 +1718,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 2;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_MAGE";
|
||||
}
|
||||
}
|
||||
|
|
@ -1690,6 +1728,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 4;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_DRAGON";
|
||||
}
|
||||
}
|
||||
|
|
@ -1699,6 +1738,7 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 8;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_HERESIARCH";
|
||||
}
|
||||
}
|
||||
|
|
@ -1708,9 +1748,30 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 10;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_KORAX";
|
||||
}
|
||||
}
|
||||
else if ( bossmap == MAP_EVMAP30 )
|
||||
{
|
||||
if ( e.Thing.GetClassName() == "ArchangelusA" )
|
||||
{
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 5;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_ARCHANGELUS";
|
||||
}
|
||||
else if ( e.Thing.GetClassName() == "ArchangelusB" )
|
||||
{
|
||||
// second phase
|
||||
bossactors.Clear();
|
||||
initialized = false;
|
||||
bossactors.Push(e.Thing);
|
||||
if ( upgrademe ) e.Thing.StartHealth = e.Thing.Health *= 5;
|
||||
if ( trk ) trk.maxhealth = trk.lasthealth = e.Thing.Health;
|
||||
bosstag = "$BT_ARCHANGELUS";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override void PostUiTick()
|
||||
|
|
@ -1936,6 +1997,18 @@ Class SWWMHandler : EventHandler
|
|||
if ( dehackery ) return;
|
||||
e.Replacement = 'SWWMHangingKeen';
|
||||
}
|
||||
else if ( (e.Replacee is 'BossBrain') && (!e.Replacement || (e.Replacement == 'BossBrain')) )
|
||||
{
|
||||
let def = GetDefaultByType(e.Replacee);
|
||||
bool dehackery = false;
|
||||
for ( State s=def.SpawnState; s; s=s.NextState )
|
||||
{
|
||||
if ( s.bDEHACKED ) dehackery = true;
|
||||
if ( s.NextState == s ) break;
|
||||
}
|
||||
if ( dehackery ) return;
|
||||
e.Replacement = 'SWWMBossBrain';
|
||||
}
|
||||
else if ( e.Replacee is 'RedCard' )
|
||||
{
|
||||
if ( level.GetChecksum() ~== "3805A661D5C4523AFF7BF86991071043" )
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ Class SWWMHelpMenu : GenericMenu
|
|||
if ( gameinfo.gametype&GAME_Heretic ) txt = StringTable.Localize("$SWWM_HELP_STORYHERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) txt = StringTable.Localize("$SWWM_HELP_STORYHEXEN");
|
||||
else if ( gameinfo.gametype&GAME_Strife ) txt = StringTable.Localize("$SWWM_HELP_STORYSTRIFE");
|
||||
else if ( SWWMUtility.IsEviternity() ) txt = StringTable.Localize("$SWWM_HELP_STORYEVITERNITY");
|
||||
else txt = StringTable.Localize("$SWWM_HELP_STORYDOOM");
|
||||
break;
|
||||
case PAGE_DEMO:
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
int sel0, sel1, sel2;
|
||||
int ofs0, ofs1, ofs2; // usually equal to above, except when using mouse input
|
||||
int drag; // when dragging with the mouse, which scroller to affect (1 = ofs0 and so on)
|
||||
// mission
|
||||
String missionstr;
|
||||
// stats
|
||||
SWWMStats stats;
|
||||
Array<String> statlist;
|
||||
|
|
@ -144,6 +146,17 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
tmsgtic = gametic+70;
|
||||
lasttuid = Random[TUID]();
|
||||
hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
// mission text
|
||||
// TODO per-cluster messages
|
||||
if ( gameinfo.gametype&GAME_Doom )
|
||||
{
|
||||
if ( SWWMUtility.IsEviternity() ) missionstr = "$SWWM_MISSION_EVITERNITY";
|
||||
else missionstr = "$SWWM_MISSION_DOOM";
|
||||
}
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) missionstr = "$SWWM_MISSION_HERETIC";
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) missionstr = "$SWWM_MISSION_HEXEN";
|
||||
else if ( gameinfo.gametype&GAME_Strife ) missionstr = players[consoleplayer].logtext; // just show the quest log
|
||||
else missionstr = "$SWWM_MISSION_NONE";
|
||||
if ( gameinfo.gametype&GAME_Heretic )
|
||||
{
|
||||
// March 10th 2171, 17:34 JST
|
||||
|
|
@ -366,11 +379,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
}
|
||||
else if ( curtab == TAB_MISSION )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
if ( gameinfo.gametype&GAME_Doom ) str = StringTable.Localize("$SWWM_MISSION_DOOM");
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
else if ( gameinfo.gametype&GAME_Strife ) str = StringTable.Localize(players[consoleplayer].logtext);
|
||||
String str = StringTable.Localize(missionstr);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
if ( (l.Count() > 28) && (sel0 < l.Count()-28) )
|
||||
|
|
@ -796,11 +805,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
// are we clicking where the scrollbar should be?
|
||||
if ( mpos.x < 632 ) return res;
|
||||
String str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
if ( gameinfo.gametype&GAME_Doom ) str = StringTable.Localize("$SWWM_MISSION_DOOM");
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
else if ( gameinfo.gametype&GAME_Strife ) str = StringTable.Localize(players[consoleplayer].logtext);
|
||||
String str = StringTable.Localize(missionstr);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
else return res; // no scrollbar
|
||||
|
|
@ -1330,11 +1335,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
if ( curtab == TAB_MISSION )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
if ( gameinfo.gametype&GAME_Doom ) str = StringTable.Localize("$SWWM_MISSION_DOOM");
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
else if ( gameinfo.gametype&GAME_Strife ) str = StringTable.Localize(players[consoleplayer].logtext);
|
||||
String str = StringTable.Localize(missionstr);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
else return res; // no scrollbar
|
||||
|
|
@ -2488,11 +2489,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
// draw contents
|
||||
if ( curtab == TAB_MISSION )
|
||||
{
|
||||
if ( gameinfo.gametype&GAME_Doom ) str = StringTable.Localize("$SWWM_MISSION_DOOM");
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
else if ( gameinfo.gametype&GAME_Strife ) str = StringTable.Localize(players[consoleplayer].logtext);
|
||||
else str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
String str = StringTable.Localize(missionstr);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
xx = 6;
|
||||
|
|
|
|||
|
|
@ -613,13 +613,12 @@ Class SWWMUtility
|
|||
case 'Cyberdemon':
|
||||
basetag = "CYBER";
|
||||
break;
|
||||
case 'BossBrain':
|
||||
case 'SWWMBossBrain':
|
||||
basetag = "BOSSBRAIN";
|
||||
break;
|
||||
case 'WolfensteinSS':
|
||||
basetag = "WOLFSS";
|
||||
break;
|
||||
case 'CommanderKeen':
|
||||
case 'SWWMHangingKeen':
|
||||
basetag = "KEEN";
|
||||
break;
|
||||
|
|
@ -722,6 +721,26 @@ Class SWWMUtility
|
|||
case 'Heresiarch':
|
||||
basetag = "HERESIARCH";
|
||||
break;
|
||||
case 'Pig':
|
||||
basetag = "PIG";
|
||||
break;
|
||||
// eviternity
|
||||
case 'ArchangelusA':
|
||||
case 'ArchangelusB':
|
||||
basetag = "ANGEL";
|
||||
break;
|
||||
case 'AstralCaco':
|
||||
basetag = "ASTRAL";
|
||||
break;
|
||||
case 'Annihilator':
|
||||
basetag = "ANNIHIL";
|
||||
break;
|
||||
case 'FormerCaptain':
|
||||
basetag = "FCAPTAIN";
|
||||
break;
|
||||
case 'NightmareDemon':
|
||||
basetag = "NDEMON";
|
||||
break;
|
||||
}
|
||||
if ( basetag == "" ) return a.GetTag(defstr);
|
||||
String funtag = "FN_"..basetag.."_FUN";
|
||||
|
|
@ -878,6 +897,7 @@ Class SWWMUtility
|
|||
if ( a is 'Cacodemon' ) return true;
|
||||
if ( a.Species == 'RLCacodemon' ) return true; // DRLA
|
||||
if ( a.Species == 'Caco' ) return true; // CH
|
||||
if ( a.GetClassName() == 'AstralCaco' ) return true; // Eviternity
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -913,6 +933,18 @@ Class SWWMUtility
|
|||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// detect eviternity (naive method)
|
||||
static bool IsEviternity()
|
||||
{
|
||||
for ( int i=0; i<AllActorClasses.Size(); i++ )
|
||||
{
|
||||
if ( AllActorClasses[i].GetClassName() != "Archangelus" )
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Class RadiusDebugSphere : Actor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue