Remove fat chodes, Silver Bullet reimplemented.

This commit is contained in:
Mari the Deer 2022-10-07 20:13:10 +02:00
commit 62d10ed11c
46 changed files with 333 additions and 1413 deletions

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,6 @@ Class SilverBulletCasing : SWWMCasing
BounceSound "silverbullet/casing";
}
}
Class SilverBulletCasing2 : SilverBulletCasing {}
Class SilverBulletMag : SWWMCasing
{
@ -36,7 +35,6 @@ Class SilverBulletMag : SWWMCasing
Stop;
}
}
Class SilverBulletMag2 : SilverBulletMag {}
Class SilverAirRip : Actor
{
@ -83,17 +81,6 @@ Class SilverAirRip : Actor
Stop;
}
}
Class SilverAirRip2 : SilverAirRip
{
Default
{
Obituary "$O_SILVERBULLET2";
}
override void Explode()
{
SWWMUtility.DoExplosion(self,20,2000,30,ignoreme:target);
}
}
Class SilverImpact : Actor
{
@ -178,246 +165,3 @@ Class SilverImpact : Actor
Stop;
}
}
Class ExploLight3 : PaletteLight
{
Default
{
ReactionTime 30;
Args 0,0,0,250;
}
}
Class FatChodeRing : Actor
{
Default
{
RenderStyle "Add";
Scale 3.;
Radius 0.1;
Height 0;
+NOGRAVITY;
+NOBLOCKMAP;
+FORCEXYBILLBOARD;
+NOTELEPORT;
+NOINTERACTION;
}
override void Tick()
{
if ( isFrozen() ) return;
if ( !CheckNoDelay() || (tics == -1) ) return;
if ( tics > 0 ) tics--;
while ( !tics )
{
if ( !SetState(CurState.NextState) )
return;
}
}
States
{
Spawn:
XRG0 ABCDEFGHIJKLMNOPQRSTUVWX 1 Bright A_SetScale(scale.x*1.06);
Stop;
}
}
Class FatChodeImpact : Actor
{
double realangle, realpitch;
Default
{
Obituary "$O_SILVERBULLET2";
DamageType 'Explodium';
RenderStyle "Add";
Radius 0.1;
Height 0;
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOBLOCKMAP;
+FORCEXYBILLBOARD;
+FORCERADIUSDMG;
+NODAMAGETHRUST;
+NOTELEPORT;
+NOINTERACTION;
Scale 4.5;
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMUtility.DoExplosion(self,600,40000,250,120,DE_THRUWALLS|DE_EXTRAZTHRUST);
A_AlertMonsters(swwm_uncapalert?0:8000);
A_QuakeEx(7,7,7,50,0,2000,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:800,rollIntensity:1.);
A_StartSound("silverbullet/chode",CHAN_VOICE,CHANF_DEFAULT,1.,.35);
A_SprayDecal("BigPock",-64);
A_SprayDecal("HugeWallCrack",-64);
A_SprayDecal("WumboRocketBlast",-64);
Scale *= FRandom[ExploS](0.8,1.1);
Scale.x *= RandomPick[ExploS](-1,1);
Scale.y *= RandomPick[ExploS](-1,1);
int numpt = Random[Silverbullet](15,25);
Vector3 x = SWWMUtility.Vec3FromAngles(angle,pitch);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+SWWMUtility.Vec3FromAngles(FRandom[Silverbullet](0,360),FRandom[Silverbullet](-90,90))*.4).unit()*FRandom[Silverbullet](.4,2.);
let s = Spawn("SWWMSmoke",pos);
s.vel = pvel;
s.scale *= 1.8;
s.special1 = Random[Silverbullet](1,4);
s.SetShade(Color(1,1,1)*Random[Silverbullet](96,192));
}
numpt = Random[Silverbullet](6,9);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[Silverbullet](0,360),FRandom[Silverbullet](-90,90))*FRandom[Silverbullet](2,8);
let s = Spawn("SWWMSpark",pos);
s.scale *= 1.3;
s.vel = pvel;
}
numpt = Random[Silverbullet](10,15);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+SWWMUtility.Vec3FromAngles(FRandom[Silverbullet](0,360),FRandom[Silverbullet](-90,90))*.6).unit()*FRandom[Silverbullet](6,20);
let s = Spawn("SWWMChip",pos);
s.scale *= 1.6;
s.vel = pvel;
}
numpt = Random[Silverbullet](16,20);
for ( int i=0; i<numpt; i++ )
{
let s = Spawn("FatChodeExtraArm",pos);
s.target = target;
}
numpt = Random[Silverbullet](8,10);
Vector3 y, z, dir;
double a, s;
[x, y, z] = swwm_CoordUtil.GetAxes(realpitch,realangle,0);
for ( int i=0; i<numpt; i++ )
{
let e = Spawn("FatChodeExplosionArm",pos);
e.target = target;
a = FRandom[Silverbullet](0,360);
s = FRandom[Silverbullet](0,.2);
dir = SWWMUtility.ConeSpread(x,y,z,a,s);
e.angle = atan2(dir.y,dir.x);
e.pitch = asin(-dir.z);
}
Spawn("ExploLight3",pos);
Spawn("FatChodeRing",pos);
}
override void Tick()
{
if ( isFrozen() ) return;
if ( !CheckNoDelay() || (tics == -1) ) return;
if ( tics > 0 ) tics--;
while ( !tics )
{
if ( !SetState(CurState.NextState) )
return;
}
}
States
{
Spawn:
XEX1 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ 1 Bright;
Stop;
}
}
Class FatChodeExtraArm : ExplodiumMagArm
{
Default
{
Obituary "$O_SILVERBULLET2";
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
vel *= 1.5;
}
}
Class FatChodeExplosionTrail : Actor
{
Default
{
RenderStyle "Add";
Radius 0.1;
Height 0;
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOTELEPORT;
+NOBLOCKMAP;
+FORCEXYBILLBOARD;
+NOTELEPORT;
+NOINTERACTION;
Scale 3.;
}
override void Tick()
{
if ( isFrozen() ) return;
if ( !CheckNoDelay() || (tics == -1) ) return;
if ( tics > 0 ) tics--;
while ( !tics )
{
if ( !SetState(CurState.NextState) )
return;
}
}
States
{
Spawn:
XEX1 ACEGIKMOQSUWY[ 1 Bright;
Stop;
}
}
Class FatChodeExplosionArm : Actor
{
Default
{
Obituary "$O_SILVERBULLET2";
DamageType 'Explodium';
Radius 0.1;
Height 0;
+NOGRAVITY;
+NOCLIP;
+DONTSPLASH;
+NOTELEPORT;
+NOBLOCKMAP;
+FORCERADIUSDMG;
+NODAMAGETHRUST;
+NOINTERACTION;
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
reactiontime = Random[ExploS](15,20);
vel = SWWMUtility.Vec3FromAngles(angle,pitch)*FRandom[ExploS](20.,30.);
}
States
{
Spawn:
TNT1 A 1
{
if ( !(ReactionTime%2) )
SWWMUtility.DoExplosion(self,10+reactiontime,8000+1500*reactiontime,80+5*reactiontime,50,DE_THRUWALLS);
if ( level.IsPointInLevel(pos) )
{
A_SprayDecal("HugeRocketBlast",-32);
Spawn("FatChodeExplosionTrail",pos);
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*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,4);
s.scale *= 2.4;
s.alpha *= .1+.4*(ReactionTime/15.);
}
A_CountDown();
}
Wait;
}
}

View file

@ -179,17 +179,15 @@ extend Class Sparkster
// Silver Bullet JET
extend Class SilverBullet
{
ui TextureID WeaponBox[2], ZoomBar, RoundTex[4];
ui TextureID WeaponBox[2], ZoomBar, RoundTex[2];
override void DrawWeapon( double TicFrac, double bx, double by, double hs, Vector2 ss )
{
if ( !WeaponBox[0] ) WeaponBox[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletDisplay.png");
if ( !WeaponBox[1] ) WeaponBox[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomDisplay.png");
if ( !ZoomBar ) ZoomBar = TexMan.CheckForTexture("graphics/HUD/SilverBulletZoomBar.png");
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSB.png");
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCB.png");
if ( !RoundTex[2] ) RoundTex[2] = TexMan.CheckForTexture("graphics/HUD/SilverBulletXSBCasing.png");
if ( !RoundTex[3] ) RoundTex[3] = TexMan.CheckForTexture("graphics/HUD/SilverBulletFCBCasing.png");
if ( !RoundTex[0] ) RoundTex[0] = TexMan.CheckForTexture("graphics/HUD/SilverBulletRound.png");
if ( !RoundTex[1] ) RoundTex[1] = TexMan.CheckForTexture("graphics/HUD/SilverBulletCasing.png");
double zl = clamp(ZoomInter?ZoomInter.GetValue(TicFrac):(zoomlevel*10),0.,160.);
if ( zl >= 10. )
{
@ -199,9 +197,9 @@ extend Class SilverBullet
Screen.DrawTexture(ZoomBar,false,bx-18,by-37,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_WindowRightF,zw);
}
Screen.DrawTexture(WeaponBox[0],false,bx-20,by-29,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( chambered ) Screen.DrawTexture(RoundTex[fcbchambered+fired*2],false,bx-18,by-27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( chambered ) Screen.DrawTexture(RoundTex[fired],false,bx-18,by-27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
for ( int i=0; i<clipcount; i++ )
Screen.DrawTexture(RoundTex[fcbloaded],false,bx-18,by-(22-i*4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
Screen.DrawTexture(RoundTex[0],false,bx-18,by-(22-i*4),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
}
}