Skip to content

Commit

Permalink
fixed stuff, updated cacoball
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyllgrim committed May 23, 2019
1 parent 92446d5 commit 681194e
Show file tree
Hide file tree
Showing 26 changed files with 168 additions and 118 deletions.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAA0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAB0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAC0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAD0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAE0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAF0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAG0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAH0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAI0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAK0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAL0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAM0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/MONSTERS/Cacodemon/electroball/ELBAO0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion Z_BDoom/bd_main.zc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ override void PostBeginPlay()
}
override void Tick()
{
super.Tick();
if(level.isFrozen())
return;
if ( (sfxtype == 'debris' && !bdoom_debris) ||
(sfxtype == 'flames' && !bdoom_flames) ||
(sfxtype == 'blood' && !bdoom_blood) ||
Expand All @@ -72,7 +75,6 @@ override void Tick()
destroy();
return;
}
super.Tick();
}
bool CheckWater() {
string flr = TexMan.GetName(floorpic);
Expand Down
5 changes: 4 additions & 1 deletion Z_BDoom/bd_weapon.zc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ states
{
Spawn:
PUFF A 1 bright {
if (bdoom_tracers == 0) {
if (!bdoom_tracers) {
self.destroy();
return ResolveState(null);
}
Expand Down Expand Up @@ -336,6 +336,9 @@ override void Tick() {
}
states
{
Spawn:
PUFF A 1 bright;
loop;
Death:
TNT1 A 1 A_SpawnItemEx("EnBulletPuff",0,0,0,0,0,0,0,SXF_SETTARGET|SXF_ORIGINATOR);
stop;
Expand Down
5 changes: 2 additions & 3 deletions Z_BDoom/m_Bruiser.zc
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,11 @@ Default {
override void PostBeginPlay () {
super.PostBeginPlay();
if (bdoom_debris) {
actor f = Spawn("BD_ProjFlare",pos);
let f = BD_ProjFlare(Spawn("BD_ProjFlare",pos));
f.master = self;
f.alpha = 0.6;
f.scale = (0.12,0.12);
let flr = BD_ProjFlare(f);
flr.fcolor = "green";
f.fcolor = "green";
}
broll = random(14,20)*randompick(-1,1);
}
Expand Down
106 changes: 87 additions & 19 deletions Z_BDoom/m_Cacodemon.zc
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,103 @@ states
}
}

Class CacoRedTrail : Actor
{
Default {
+NOINTERACTION
+NOBLOCKMAP
renderstyle "Add";
alpha 0.8;
scale 0.05;
}
states
{
Spawn:
LENR A 1 {
A_FadeOut(0.2);
scale*=0.95;
}
loop;
}
}

Class CacoBlueTrail : Actor
{
Default {
+NOINTERACTION
+NOBLOCKMAP
renderstyle "Add";
alpha 0.8;
scale 0.1;
}
states
{
Spawn:
LENB A 1 {
A_FadeOut(0.2);
scale*=0.95;
}
loop;
}
}

Class BD_CacodemonBall : CacodemonBall //replaces CacodemonBall
{
int broll;
Default {
+FORCEXYBILLBOARD
+ROLLSPRITE
-ROLLCENTER
decal "Scorch";
renderstyle "Add";
alpha 0.9;
scale 0.5;
alpha 1.0;
scale 0.2;
}
override void PostBeginPlay () {
super.PostBeginPlay();
scale.x*= randompick(-1,1);
scale.y*= randompick(-1,1);
roll = random(0,360);
broll = random(6,8)*randompick(1,-1);
if (bdoom_debris) {
let f = BD_ProjFlare(Spawn("BD_ProjFlare",pos));
f.fcolor = 'blue';
f.scale = (0.21,0.21);
f.alpha = 0.3;
f.master = self;

/*let f1 = BD_ProjFlare(Spawn("BD_ProjFlare",pos));
f1.fcolor = 'red';
f1.scale = (0.1,0.1);
f1.alpha = 0.85;
f1.master = self;*/
}
}
override void Tick () {
Vector3 oldPos = self.pos;
Super.Tick();
if (!bdoom_debris || level.isFrozen() )
return;
Vector3 path = level.vec3Diff( self.pos, oldPos );
double distance = path.length() / 3; //this determines how far apart the particles are
Vector3 direction = path / distance;
int steps = int( distance );

for( int i = 0; i < steps; i++ ) {
Spawn("CacoRedTrail", oldPos );
Spawn("CacoBlueTrail", oldPos );
oldPos = level.vec3Offset( oldPos, direction );
}
}
States
{
Spawn:
CABA ABCD 2 bright NoDelay {
if (bdoom_debris) {
A_SpawnItemEx("FirePiece_Cacodemon",frandom(-3,-6),frandom(-5,5),frandom(-5,5),0,0,0,0);
A_SpawnItemEx("FirePiece_Cacodemon",frandom(-3,-6),frandom(-5,5),frandom(-5,5),0,0,0,0);
}
ELBA ABCDEFGHIJKLMNO 2 bright NoDelay {
roll+=broll;
/*if (bdoom_debris) {
A_SpawnItemEx("FirePiece_Cacodemon",frandom(-3,-6),frandom(-5,5),frandom(-5,5),0,0,0,failchance:96);
A_SpawnItemEx("FirePiece_Cacodemon",frandom(-3,-6),frandom(-5,5),frandom(-5,5),0,0,0,failchance:96);
}*/
}
loop;
Death:
Expand All @@ -194,15 +274,3 @@ states
wait;
}
}

/*
Actor FirePiece_Cacodemon : FirePiece
{
translation "169:191=192:207", "208:223=169:191"
states
{
Spawn:
FIRP ABCDEFGHIJ 2 A_FadeOut(0.1)
stop
}
}
7 changes: 3 additions & 4 deletions Z_BDoom/m_Mancubus.zc
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ Default {
override void PostBeginPlay () {
super.PostBeginPlay();
if (bdoom_debris) {
actor f = Spawn("BD_ProjFlare",pos);
let f = BD_ProjFlare(Spawn("BD_ProjFlare",pos));
f.master = self;
f.alpha = 0.6;
f.scale = (0.25,0.25);
let flr = BD_ProjFlare(f);
flr.fcolor = "yellow";
f.scale = (0.25,0.25);
f.fcolor = "yellow";
}
}
States
Expand Down
5 changes: 2 additions & 3 deletions Z_BDoom/m_doomimp.zc
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ Default {
override void PostBeginPlay () {
super.PostBeginPlay();
if (bdoom_debris) {
actor f = Spawn("BD_ProjFlare",pos);
let f = BD_ProjFlare(Spawn("BD_ProjFlare",pos));
f.fcolor = "yellow";
f.master = self;
let flr = BD_ProjFlare(f);
flr.fcolor = "yellow";
}
}
States
Expand Down
1 change: 1 addition & 0 deletions Z_BDoom/o_inventory.zc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Class BD_Blursphere : Blursphere //replaces Blursphere
{
Default {
+FLOATBOB
-ZDOOMTRANS
floatbobstrength 0.6;
+FORCEXYBILLBOARD;
-VISIBILITYPULSE;
Expand Down
2 changes: 2 additions & 0 deletions Z_BDoom/o_lightsources.zc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ override void Tick() {
return;
}
super.tick();
if (level.IsFrozen())
return;
timer++;
if (timer >= 5) {
timer = 0;
Expand Down
39 changes: 20 additions & 19 deletions Z_BDoom/w_BFG.zc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ states
A_Playsound("weapons/bfg/cool");
}
BBGN EEDDCCBB 2 {
if (bdoom_debris == 1)
if (bdoom_debris)
A_SpawnItemEx("WeaponSmoke",cos(pitch)*25,random(-5,5),sin(-pitch)*25+random(33,37), 0,0,1,0);
}
BBGN AA 2;
Expand Down Expand Up @@ -159,14 +159,14 @@ states
}
TNT1 A 0 A_JumpIf(invoker.railcounter >= 100,"AltEndLong");
BBGN EEEDDDCCCBBB 2 {
if (bdoom_debris == 1)
if (bdoom_debris)
A_SpawnItemEx("WeaponSmoke",cos(pitch)*25,random(-5,5),sin(-pitch)*25+random(33,37), 0,0,1,0);
}
BBGN A 5 { invoker.railcounter = 0; }
goto ready;
AltEndLong: //Played only if you held the button until the end
BBGN EEEEEDDDDDCCCCCBBBBB 2 {
if (bdoom_debris == 1)
if (bdoom_debris)
A_SpawnItemEx("WeaponSmoke",cos(pitch)*25,random(-5,5),sin(-pitch)*25+random(33,37), 0,0,1,0);
}
BBGN A 5 { invoker.railcounter = 0; }
Expand Down Expand Up @@ -371,12 +371,12 @@ States
Spawn:
TNT1 A 0 NoDelay {
A_PlaySound("weapons/bfg/fly",6,1.0,TRUE,1);
if (bdoom_debris == 1)
if (bdoom_debris)
A_SpawnItemEx("BFGFlare",0,0,0,vel.x,vel.y,vel.z,0,SXF_SETMASTER|SXF_ORIGINATOR|SXF_ABSOLUTEVELOCITY);
}
Spawn1:
BFGB ABCDEFGH 1 bright {
if (bdoom_debris == 1)
if (bdoom_debris)
A_CustomRailGun(0,0,"","FFFFFF",RGF_CENTERZ|RGF_SILENT|RGF_NOPIERCING,0,4,"NullPuff",random(0,360),random(0,360),64,20,0,4,"BFGBallRay");
}
loop;
Expand Down Expand Up @@ -484,7 +484,7 @@ states
{
Spawn:
TNT1 A 0 Nodelay {
if (Bdoom_debris == 1)
if (bdoom_debris)
A_SpawnItemEx("BFGBallRayFlare",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS);
//did you know that the actor that fires the railgun is also the target of the railgun particles? phantombeta knew
//transfer velocity so that the lightning is always next to the bfg orb and not lagging behind
Expand Down Expand Up @@ -530,7 +530,7 @@ states
{
Spawn:
TNT1 A 0 NoDelay {
If(bdoom_debris == 1) {
If(bdoom_debris) {
for (int i = 16; i > 0; i--)
A_SpawnItemEx("BFGPlasmaPiece",0,0,0,frandom(-2.5,2.5),frandom(-2.5,2.5),frandom(-2.5,2.5),random(0,360));
}
Expand Down Expand Up @@ -577,7 +577,7 @@ states
{
Spawn:
TNT1 A 0 NoDelay {
if(Bdoom_debris == 1)
if(bdoom_debris)
A_SpawnItemEx("BFGRailFlare",0,0,0,0,0,0,0);
}
PEXP ABCDEFGHIJKLM 1 bright A_FadeOut(0.1);
Expand Down Expand Up @@ -607,7 +607,7 @@ states
{
Spawn:
TNT1 A 0 noDelay {
if(Bdoom_debris == 1)
if(bdoom_debris)
A_SpawnItemEx("BFGRailFlare_Hold");
}
TNT1 A 0 A_Jump(256,1,2,3,4,5);
Expand Down Expand Up @@ -640,7 +640,7 @@ states
{
Spawn:
TNT1 A 1 NoDelay {
if (bdoom_debris == 1) {
if (bdoom_debris) {
for (int i = 12; i > 0; i--)
A_SpawnItemEx("BFGPlasmaPiece",0,0,0,frandom(-2.5,2.5),frandom(-2.5,2.5),frandom(-2.5,2.5),random(0,360));
for (int i = 8; i > 0; i--)
Expand All @@ -656,8 +656,8 @@ Class ModernBFGBall : BFGBall
{
//wcharge just transfers the charge value from the weapon. 1-8 is normal shot, 9-12 is overcharge (12 leads to self-destruct)
double wcharge;
//wpower determines the power and range of rails; it's the same as wcharge but clamped to 8
// (because overcharging isn't meant to increase power, it just lets you hold off the shot)
/*wpower determines the power and range of rails; it's the same as wcharge but clamped to 8
(because overcharging isn't meant to increase power, it just lets you hold off the shot)*/
double wpower;
Default {
+FORCEXYBILLBOARD
Expand All @@ -674,17 +674,18 @@ Default {
damage 0;
radius 14;
height 8;
//missiletype "MBFGTrail";
}
Override void PostBeginPlay() {
super.PostBeginPlay();
if (target) {
species = target.species;
//console.printf("%s",species);
let BFG = BD_BFG9000 (target.player.readyweapon);
wcharge = BFG.wcharge;
wpower = clamp(BFG.wcharge,1,8);
A_SetScale (0.06 + wcharge * 0.03);
if (BFG) {
wcharge = BFG.wcharge;
wpower = clamp(BFG.wcharge,1,8);
A_SetScale (0.06 + wcharge * 0.03);
}
}
}
States
Expand All @@ -694,7 +695,7 @@ States
if (wcharge >= 12)
return ResolveState("SelfDestruct");
A_PlaySound("weapons/bfg/fly",6,1.0,TRUE);
if(Bdoom_debris == 1)
if(bdoom_debris)
A_SpawnItemEx("ModernBFGFlare",0,0,0,vel.x,vel.y,vel.z,0,SXF_SETMASTER|SXF_ORIGINATOR|SXF_ABSOLUTEVELOCITY|SXF_TRANSFERSCALE);
return ResolveState(null);
}
Expand All @@ -719,8 +720,8 @@ States
COIX AAAAAAAA 1 bright {
//visuals
roll+=10;
A_CustomRailGun(0,0,"","FFFFFF",RGF_CENTERZ|RGF_SILENT|RGF_NOPIERCING,0,15,"NullPuff",random(0,360),random(0,360),random(22,56),duration:56,sparsity:3.0,spawnclass:"MBFGRailParticle");
A_CustomRailGun(0,0,"","FFFFFF",RGF_CENTERZ|RGF_SILENT|RGF_NOPIERCING,0,15,"NullPuff",random(0,360),random(0,360),random(22,56),duration:56,sparsity:3.0,spawnclass:"MBFGRailParticle");
A_CustomRailGun(0,0,"","FFFFFF",RGF_CENTERZ|RGF_SILENT|RGF_NOPIERCING,0,15,"NullPuff",random(0,360),random(0,360),random(64,128),duration:56,sparsity:3.0,spawnclass:"MBFGRailParticle");
A_CustomRailGun(0,0,"","FFFFFF",RGF_CENTERZ|RGF_SILENT|RGF_NOPIERCING,0,15,"NullPuff",random(0,360),random(0,360),random(64,128),duration:56,sparsity:3.0,spawnclass:"MBFGRailParticle");

double closestDist = double.infinity;
double rdistance = 144*wpower; //effective distance depends on charge
Expand Down
Loading

0 comments on commit 681194e

Please sign in to comment.