Skip to content

Commit

Permalink
fixed SSG, updated Archvile
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyllgrim committed Jun 11, 2019
1 parent b4f3bcc commit 7d9dbf8
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 22 deletions.
2 changes: 2 additions & 0 deletions SNDINFO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ chainguy/death3 dcpodth3

electric/hum elcthum1

archvile/flameprep "Sounds/arfireprep.ogg"
archvile/flameexplosion "Sounds/arfireexplo.ogg"

//////////////////////////
//// ITEMS & OBJECTS /////
Expand Down
Binary file added Sounds/arfireexplo.ogg
Binary file not shown.
Binary file added Sounds/arfireprep.ogg
Binary file not shown.
25 changes: 13 additions & 12 deletions Z_BDoom/bd_weapon.zc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ int NonselTimer; //counts how long the weapon was deselected, used for automatic
int AutoReloadTime; //the value that NonselTimer is compared to
property AutoReloadTime : AutoReloadTime;

Default { //required default values for A_CameraSway. Otherwise it'll crash due to division by zero
Default {
BDoomWeapon.AutoReloadTime 60;
BDoomWeapon.maxOffsetTics 1;
BDoomWeapon.maxOffsetTics 1; //required default values for A_CameraSway. Otherwise it'll crash due to division by zero
BDoomWeapon.offsetTics -1;
}

Expand Down Expand Up @@ -276,7 +276,7 @@ states
Spawn:
PUFF A 1 bright {
if (!bdoom_tracers) {
self.destroy();
destroy();
return ResolveState(null);
}
return ResolveState(null);
Expand Down Expand Up @@ -410,7 +410,7 @@ Default {
override void Tick() {
super.Tick();
if (ripdepth <= 0)
self.destroy();
destroy();
}
override int SpecialMissileHit(actor victim) {
if (victim && !victim.player) {
Expand Down Expand Up @@ -475,20 +475,21 @@ states
{
Spawn:
CAS1 A 0 NoDelay {
if(!target) {
destroy();
return ResolveState(null);
}
if (self is "PistolCasing")
self.sprite = GetSpriteIndex("CAS1");
sprite = GetSpriteIndex("CAS1");
else if (self is "ShotgunCasing")
self.sprite = GetSpriteIndex("CAS2");
sprite = GetSpriteIndex("CAS2");
else if (self is "ChaingunCasing")
self.sprite = GetSpriteIndex("CAS3");
sprite = GetSpriteIndex("CAS3");
roll = frandom(88,92);
return ResolveState(null);
}
Fly:
#### AABBCCBBAABBCCBB 1 {
if(!target) {
self.destroy();
return ResolveState(null);
}
roll += brot;
if (waterlevel > 0)
return ResolveState("waterland");
Expand All @@ -507,7 +508,7 @@ states
Death:
#### # 0 {
if (CheckWater() || (target && target.bISMONSTER)) {
self.destroy();
destroy();
return ResolveState(null);
}
A_QueueCorpse();
Expand Down
100 changes: 91 additions & 9 deletions Z_BDoom/m_ArchVile.zc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ states
VILW abcdeefghijj 2 a_vilechase;
Loop;
Missile:
NVIL A 0 Bright A_VileStart;
TNT1 A 0 Bright A_VileStart();
NVIL ABCDE 2 bright {
A_FaceTarget();
if (bdoom_flames) {
Expand All @@ -70,6 +70,7 @@ states

NVIL F 2 bright {
A_VileTarget("BD_ArchvileFire");
A_SpawnProjectile("ArchFlameSeeker");
if (bdoom_flames) {
A_SpawnItemEx("ParticleFire_Yellow",-8,-22,frandom(70,82),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0.9,1.4));
A_SpawnItemEx("ParticleFire_Yellow",-8, 22,frandom(70,82),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0.9,1.4));
Expand Down Expand Up @@ -110,7 +111,7 @@ states
}
}
MissileDo:
TNT1 A 0 A_VileAttack;
TNT1 A 0 A_VileAttack();
NVIL NNOO 2 bright {
if (bdoom_flames) {
A_SpawnItemEx("ParticleFire_Yellow",36,frandom(-1.5,1.5),frandom(37,40),frandom(-2.2,2.2),frandom(-2.2,2.2),frandom(-1,2));
Expand Down Expand Up @@ -185,17 +186,98 @@ States
{
Spawn:
TNT1 A 0 NoDelay A_JumpIf(bdoom_Flames == false,"Super::Spawn");

TNT1 A 2 A_StartFire;
TNT1 AAA 2 A_Fire;
TNT1 A 2 A_FireCrackle;
TNT1 AAAAAAAAAAAAA 2 A_Fire;
TNT1 A 2 A_FireCrackle;
TNT1 AAAAAAAAAAA 2 A_Fire;
TNT1 A 0 A_Playsound("archvile/flameprep"); //A_StartFire;
TNT1 AAAA 2 A_Fire;
TNT1 AAAAAAAAAAAAAA 2 A_Fire;
TNT1 AA 2;
TNT1 A 0 A_PlaySound("archvile/flameexplosion"); //A_FireCrackle;
TNT1 AAAAAAAAA 2 A_Fire;
stop;
}
}

Class ArchFlameSeeker : Actor
{
int ftimer;
double tdist;
double fspeed;
Default {
projectile;
+SEEKERMISSILE
+FLOORHUGGER
+THRUACTORS
speed 20;
}
override void PostBeginPlay() {
super.PostBeginPlay();
ftimer = 42;
if (target && target.tracer)
tracer = target.tracer;
}
override void Tick() {
super.Tick();
if (!target || !(target is "BD_ArchVile") || !tracer || ftimer < 1) {
destroy();
return;
}
tdist = Distance2D(tracer);
if (tdist < tracer.radius)
SetOrigin((tracer.pos.x,tracer.pos.y,floorz),true);
fspeed = tdist / ftimer;
A_ChangeVelocity(fspeed,0,0,CVF_RELATIVE|CVF_REPLACE);
ftimer--;
}
states
{
Spawn:
TNT1 A 1 NoDelay {
if (tracer)
A_FaceTracer(20,flags:FAF_BOTTOM);
A_SpawnItemEx("ArchFlameSeekerTrail",flags:SXF_SETMASTER|SXF_ORIGINATOR);
}
loop;
}
}

Class ArchFlameSeekerTrail : ParticleFire_General
{
BD_BaseFlare flare;
Default {
scale 0.4;
alpha 0.8;
+RELATIVETOFLOOR
+MOVEWITHSECTOR
+BRIGHT
}
override void PostBeginPlay() {
super.PostBeginPlay();
flare = BD_BaseFlare(Spawn("BD_BaseFlare",pos));
if (!flare) return;
flare.fcolor = "yellow";
flare.A_SetScale(0.2);
flare.alpha = 0.2;
}
states
{
Spawn:
FIPY AB 3;
Idle:
FIPY CDEFGHIJ 3 {
if (!master)
return ResolveState("End");
return ResolveState(null);
}
loop;
End:
FIPY KKLLMM 2 {
if (flare)
flare.A_FadeOut(0.04);
}
stop;
}
}


//these raise above the pentagram as well as float behind Archie when he's walking around
Class ArchFlameParticle : Flare_General
{
Expand Down
2 changes: 1 addition & 1 deletion Z_BDoom/w_ssg.zc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ states
SH2N A 3 {
If(invoker.ShotFired)
return ResolveState("Reload.Enhanced1");
A_Gunflash("AltFlash.Right");
A_Gunflash("Flash");
return ResolveState(null);
}
SH2F X 1 {
Expand Down

0 comments on commit 7d9dbf8

Please sign in to comment.