Skip to content

Commit

Permalink
Fixed A_BossDeath
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyllgrim committed May 4, 2019
1 parent 7875fad commit cdf699f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
6 changes: 4 additions & 2 deletions Z_BDoom/BD_monster.zc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void BD_Gibs()
torso2.vel.z = vel.z*frandom(0.7,0.95);
torso2.target = self;
torso2.translation = translation;
if (torso1.scale.x == -1) //horizontal scale is randomized but synced between pieces of the same torso
if (torso1.scale.x == -1) //horizontal scale is randomized but synced between pieces of the same torso, so it doesn't look like 2 left halves or 2 right halves
torso2.scale.x = -1;
}

Expand All @@ -147,6 +147,8 @@ states
stop;
Deathbleed: //for spawning animated blood pool and flies
#### # random(35,55) {
if (bBOSSDEATH)
A_BossDeath();
if (burning)
return ResolveState("DeathEnd");
return ResolveState(null);
Expand Down Expand Up @@ -266,7 +268,7 @@ states
BD_Gibs();
}
TNT1 ABCDEFGHIJKLMN 2;
goto deathend;
goto DeathEnd;
}
}

Expand Down
1 change: 1 addition & 0 deletions Z_BDoom/bd_blood.zc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Default {
height 1;
}
bool CheckLandingSize (double cradius = 0, bool checkceiling = false) {
int aangle = 0;
if (checkceiling)
return (GetZAt(cradius,0,0,GZF_ABSOLUTEANG|GZF_CEILING,AAPTR_DEFAULT) > ceilingz
|| GetZAt(cradius,0,45,GZF_ABSOLUTEANG|GZF_CEILING,AAPTR_DEFAULT) > ceilingz
Expand Down
24 changes: 24 additions & 0 deletions Z_BDoom/bd_events.zc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,30 @@ override void CheckReplacement(ReplaceEvent e) {
}
e.IsFinal = true;
}
override void Checkreplacee(ReplacedEvent e) {
if (!bdoom_replacemonsters)
return;
switch (e.Replacement.GetClassName()) {
case 'BD_Zombieman' : if (bdoom_Zombieman) e.Replacee = "Zombieman"; break;
case 'BD_ShotgunGuy' : if (bdoom_ShotgunGuy) e.Replacee = "ShotgunGuy"; break;
case 'BD_ChaingunGuy' : if (bdoom_ChaingunGuy) e.Replacee = "ChaingunGuy"; break;
case 'BD_WolfensteinSS' : if (bdoom_WolfensteinSS) e.Replacee = "WolfensteinSS"; break;
case 'BD_DoomImp' : if (bdoom_DoomImp) e.Replacee = "DoomImp"; break;
case 'BD_Demon' : if (bdoom_Demon) e.Replacee = "Demon"; break;
case 'BD_Spectre' : if (bdoom_Spectre) e.Replacee = "Spectre"; break;
case 'BD_Cacodemon' : if (bdoom_Cacodemon) e.Replacee = "Cacodemon"; break;
case 'BD_PainElemental' : if (bdoom_PainElemental) e.Replacee = "PainElemental"; break;
case 'BD_LostSoul' : if (bdoom_LostSoul) e.Replacee = "LostSoul"; break;
case 'BD_Revenant' : if (bdoom_Revenant) e.Replacee = "Revenant"; break;
case 'BD_Arachnotron' : if (bdoom_Arachnotron) e.Replacee = "Arachnotron"; break;
case 'BD_Fatso' : if (bdoom_Fatso) e.Replacee = "Fatso"; break;
case 'BD_HellKnight' : if (bdoom_HellKnight) e.Replacee = "HellKnight"; break;
case 'BD_BaronOfHell' : if (bdoom_BaronOfHell) e.Replacee = "BaronOfHell"; break;
case 'BD_ArchVile' : if (bdoom_ArchVile) e.Replacee = "ArchVile"; break;
case 'BD_Cyberdemon' : if (bdoom_Cyberdemon) e.Replacee = "Cyberdemon"; break;
case 'BD_SpiderMastermind' : if (bdoom_SpiderMastermind) e.Replacee = "SpiderMastermind"; break;
}
}
}

class ItemOverrideHandler : EventHandler
Expand Down
2 changes: 1 addition & 1 deletion Z_BDoom/bd_weapon.zc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ action void BD_Overlay(int layer = 0, statelabel statename = null, int flags = 0
A_OverlayRenderstyle(layer,style);
if (alpha != 0)
{
A_OverlayFlags(layer,PSPF_Alpha,true);
A_OverlayFlags(layer,PSPF_Alpha|PSPF_FORCEALPHA,true);
A_OverlayAlpha(layer,alpha);
}
}
Expand Down
17 changes: 6 additions & 11 deletions Z_BDoom/m_Bruiser.zc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ states
BS1M c 3 A_scream;
BS1M defg 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(8,32),frandom(2.0,4.0),frandom(2.0,4.0),frandom(1.0,4.0),random(0,360),SXF_SETTARGET,80);
BS1M h 3 A_NoBlocking;
BS1M ijkl 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(8,32),frandom(2.0,4.0),frandom(2.0,4.0),frandom(1.0,4.0),random(0,360),SXF_SETTARGET,100);
BS1M m 1 A_BossDeath();
BS1M ijklm 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(8,32),frandom(2.0,4.0),frandom(2.0,4.0),frandom(1.0,4.0),random(0,360),SXF_SETTARGET,100);
goto deathbleed;
Death1: //in halves
BS1N A 3;
Expand All @@ -72,17 +71,15 @@ states
}
BS1N defg 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
BS1N h 3 A_NoBlocking;
BS1N ijk 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
BS1N L 1 A_BossDeath();
BS1N ijkl 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
goto deathbleed;
Death2: //fall back
BS1O A 3;
BS1O b 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(18,40),frandom(3,5),frandom(-2,2),frandom(2,4),0,SXF_SETTARGET);
BS1O c 3 A_scream;
BS1O defg 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(18,40),frandom(3,5),frandom(-2,2),frandom(2,4),0,SXF_SETTARGET,64);
BS1O h 3 A_NoBlocking;
BS1O iJ 3;
BS1O K 1 A_BossDeath();
BS1O iJk 3;
goto deathbleed;
XDeath:
//TNT1 A 0 A_Jump(128,"Death");
Expand All @@ -94,7 +91,7 @@ states
BS1X ijklMN 2 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,36),frandom(-4,4),frandom(-4,4),frandom(2,4.5),0,SXF_SETTARGET,80);
BS1X OP 2;
TNT1 A 0 A_Playsound("gibs/meatland");
BS1X Q 1 A_BossDeath();
BS1X Q 1;
goto deathbleed;
Crush:
CRS3 G -1;
Expand Down Expand Up @@ -165,17 +162,15 @@ states
}
BS2N defg 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
BS2N h 3 A_NoBlocking;
BS2N ijk 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
BS2N L 1;
BS2N ijkl 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(14,32),frandom(-2,2),frandom(-2,2),frandom(4.5,7),0,SXF_SETTARGET,64);
goto deathbleed;
Death2: //fall back
BS2O A 3;
BS2O b 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(18,40),frandom(3,5),frandom(-2,2),frandom(2,4),0,SXF_SETTARGET);
BS2O c 3 A_scream;
BS2O defg 3 A_SpawnItemEx("BD_Blood",frandom(-4.0,4.0),frandom(-4.0,4.0),random(18,40),frandom(3,5),frandom(-2,2),frandom(2,4),0,SXF_SETTARGET,64);
BS2O h 3 A_NoBlocking;
BS2O iJ 3;
BS2O K 1;
BS2O iJk 3;
goto deathbleed;
XDeath:
BS2X A 3;
Expand Down
13 changes: 7 additions & 6 deletions Z_BDoom/m_Mancubus.zc
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ states
A_SpawnItemEx("Blood",frandom(-3,3),frandom(-3,3),frandom(42,47), frandom(-4,4),frandom(-4,4),frandom(2,4));
}
MANM f 3 a_noblocking;
MANM ghijklmnop 3;
MANM q 1 a_bossdeath;
MANM ghijklmnopq 3;
goto deathbleed;
Death1: //fall back
MANN a 4;
Expand All @@ -94,8 +93,7 @@ states
if (bdoom_gibs && !burning)
A_SpawnItemEx("BasicMeatPiece",frandom(-3,3),frandom(-3,3),frandom(20,40), frandom(-4,4),frandom(-4,4),frandom(2,4),0,SXF_SETTARGET,24);
}
MANN jk 4;
MANN L 1 a_bossdeath;
MANN jkL 4;
goto deathbleed;
Death2: //like vanilla but not exposing brain
MANO a 4;
Expand All @@ -105,12 +103,15 @@ states
BD_Bleed();
a_noblocking();
}
MANO Fghi 4 BD_Bleed();
MANO J 1 a_bossdeath;
MANO FghiJ 4 BD_Bleed();
goto deathbleed;
XDeath:
stop;
}
}



Class BD_FatShot : FatShot //replaces FatShot
{
Default {
Expand Down

0 comments on commit cdf699f

Please sign in to comment.