Splash dmg overhaul, infinitely better than A_Explode.

This commit is contained in:
Mari the Deer 2020-07-30 11:09:56 +02:00
commit f3e2f35708
17 changed files with 2642 additions and 102 deletions

View file

@ -9,6 +9,7 @@ Not so fundamental things during beta:
- Mag refilling system (no more wasted ammo)
- Randomized vanilla monster retagging with multiple options
- Parrying for hitscan weapons (currently parrying only handles vanilla LineAttack)
- 16:9 version of Demolitionist Menu (for people playing in 720p and similar)
- Fun options
- Omnibusting (all weapons can bust walls)
- Infinite fuel

View file

@ -66,3 +66,4 @@ server bool swwm_resetscore = true; // reset score back to 0 on pistol starts
server bool swwm_notrack = false; // disables all combat tracking (useful to speed up slaughterwads)
server bool swwm_ynykronalert = false; // caps ynykron alert (so it doesn't wake everyone up)
user bool swwm_menupause = true; // pause the game when demolitionist menu is open
server noarchive bool swwm_explosiondebug = false; // debug visual aid for DoExplosion

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \cwGZ\c- r433 (Fri 24 Jul 15:40:41 CEST 2020)";
SWWM_MODVER="\chSWWM \cwGZ\c- r434 (Thu 30 Jul 11:09:56 CEST 2020)";

View file

@ -72,4 +72,13 @@ Model "mkBloodDrop"
FrameIndex SBLD H 0 0
Skin 0 "BloodDrop4.png"
FrameIndex SBLD I 0 0
}
}
Model "RadiusDebugSphere"
{
Path "models/extra"
Model 0 "UnitSphere.obj"
Scale 1.0 1.0 1.0
FrameIndex XZW1 A 0 0
}

2486
models/extra/UnitSphere.obj Normal file

File diff suppressed because it is too large Load diff

View file

@ -251,8 +251,7 @@ Class HellblazerMissile : Actor
A_SetRenderStyle(1.0,STYLE_Add);
A_SprayDecal("BigScorch",50);
A_SetScale(4.5);
SWWMHandler.DoBlast(self,200,320000);
A_Explode(500,200);
SWWMHandler.DoExplosion(self,500,320000,200);
A_NoGravity();
A_QuakeEx(5,5,5,15,0,1500,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollIntensity:.8);
A_StopSound(CHAN_BODY);
@ -348,8 +347,7 @@ Class HellblazerCrackshot : HellblazerMissile
A_SetRenderStyle(1.0,STYLE_Add);
A_SprayDecal("BigScorch",50);
A_SetScale(6.);
SWWMHandler.DoBlast(self,250,320000);
A_Explode(500,250);
SWWMHandler.DoExplosion(self,500,320000,250);
A_NoGravity();
A_QuakeEx(6,6,6,20,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:800,rollIntensity:1.);
A_StopSound(CHAN_BODY);
@ -418,8 +416,7 @@ Class HellblazerRavager : HellblazerMissile
A_SetRenderStyle(1.0,STYLE_Add);
A_SprayDecal("HugeScorch",50);
A_SetScale(8.);
SWWMHandler.DoBlast(self,300,320000);
A_Explode(800,300);
SWWMHandler.DoExplosion(self,800,320000,300);
A_NoGravity();
A_QuakeEx(6,6,6,30,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:800,rollIntensity:1.);
A_StopSound(CHAN_BODY);
@ -497,8 +494,7 @@ Class HellblazerWarhead : HellblazerMissile
A_SetRenderStyle(1.0,STYLE_Add);
A_SprayDecal("WumboScorch",150);
A_SetScale(7.);
SWWMHandler.DoBlast(self,600,600000);
A_Explode(3000,600);
SWWMHandler.DoExplosion(self,3000,600000,400);
A_NoGravity();
A_QuakeEx(9,9,9,150,0,12000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:4000,rollIntensity:2.);
A_StopSound(CHAN_BODY);
@ -538,10 +534,7 @@ Class HellblazerWarhead : HellblazerMissile
void A_WarheadSub()
{
if ( special1 < 40 )
{
SWWMHandler.DoBlast(self,600+special1*15,600000-special1*12000);
A_Explode(320-special1*8,600+special1*15);
}
SWWMHandler.DoExplosion(self,320-special1*8,600000-special1*12000,200+special1*30);
special1++;
if ( (special1 <= 30) && !(special1%2) )
{
@ -789,8 +782,7 @@ Class HellblazerClusterMini : HellblazerMissile2
A_SetRenderStyle(1.0,STYLE_Add);
A_SprayDecal("BigScorch",50);
A_SetScale(2.5);
SWWMHandler.DoBlast(self,150,200000);
A_Explode(100,150);
SWWMHandler.DoExplosion(self,100,200000,150);
A_NoGravity();
A_QuakeEx(4,4,4,12,0,1000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:400,rollIntensity:.6);
A_StopSound(CHAN_BODY);
@ -1016,7 +1008,6 @@ Class HellblazerRavagerArm : Actor
vel = oldvel;
// re-do the bounce with our formula
vel = .8*((vel dot HitNormal)*HitNormal*FRandom[Hellblazer](-1.5,-1.)+vel);
bHITOWNER = true;
}
States
{
@ -1036,10 +1027,7 @@ Class HellblazerRavagerArm : Actor
l.target = p;
}
if ( !(ReactionTime%1) )
{
SWWMHandler.DoBlast(self,250-6*reactiontime,1000+200*reactiontime,bHITOWNER?null:target);
A_Explode(4+reactiontime*4,250-6*reactiontime,bHITOWNER?XF_HURTSOURCE:0);
}
SWWMHandler.DoExplosion(self,4+reactiontime*4,1000+200*reactiontime,250-6*reactiontime);
double spd = vel.length();
vel = (vel*.4+(FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2))).unit()*spd;
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,5);
@ -1121,8 +1109,7 @@ Class HellblazerWarheadArm : Actor
{
A_CountDown();
Spawn("HellblazerWarheadTrail",pos);
SWWMHandler.DoBlast(self,120+3*reactiontime,3000+500*reactiontime);
A_Explode(30+reactiontime*5,120+3*reactiontime);
SWWMHandler.DoExplosion(self,30+reactiontime*5,3000+500*reactiontime,120+3*reactiontime);
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;

View file

@ -2147,6 +2147,25 @@ Class ForcedFallerDamager : Thinker
}
}
Class RadiusDebugSphere : Actor
{
Default
{
RenderStyle "AddStencil";
StencilColor "White";
Radius .1;
Height 0.;
+NOGRAVITY;
+NOINTERACTION;
}
States
{
Spawn:
XZW1 A 1 A_FadeOut();
Wait;
}
}
// Handler responsible for item replacements and whatever else
Class SWWMHandler : EventHandler
{
@ -3682,6 +3701,79 @@ Class SWWMHandler : EventHandler
Victim.vel += Momentum;
}
// complete spherical and more accurate replacement of A_Explode
// 100% free of the buggery GZDoom's own splash damage has
static void DoExplosion( Actor Source, double Damage, double MomentumTransfer, double ExplosionRadius, double FullDamageRadius = 0., Name DamageType = '', Actor ignoreme = null )
{
// debug, display radius sphere
if ( swwm_explosiondebug )
{
let s = Actor.Spawn("RadiusDebugSphere",Source.pos);
s.Scale *= ExplosionRadius;
s.SetShade((Damage>0)?"Green":"Blue");
if ( FullDamageRadius > 0. )
{
let s = Actor.Spawn("RadiusDebugSphere",Source.pos);
s.Scale *= FullDamageRadius;
s.SetShade("Red");
}
}
double brange = 1./(ExplosionRadius-FullDamageRadius);
Actor Instigator = Source.bMISSILE?Source.target:Source;
BlockThingsIterator bi = BlockThingsIterator.Create(Source,ExplosionRadius*2); // test with doubled radius, just to be sure
while ( bi.Next() )
{
Actor a = bi.Thing;
// early checks for self and ignored actor (usually the instigator)
if ( !a || (a == ignoreme) || (a == Source) )
continue;
// can't be affected
if ( !a.bSHOOTABLE && !a.bVULNERABLE )
continue;
// no blasting if no radius dmg (unless forced)
if ( a.bNORADIUSDMG && !Source.bFORCERADIUSDMG )
continue;
// check the DONTHARMCLASS/DONTHARMSPECIES flags
if ( !a.player && ((Source.bDONTHARMCLASS && (a.GetClass() == Source.GetClass())) || (Source.bDONTHARMSPECIES && (a.GetSpecies() == Source.GetSpecies()))) )
continue;
// can we see it
if ( !Source.CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
continue;
// intersecting?
if ( !SWWMUtility.SphereIntersect(a,Source.pos,ExplosionRadius) )
continue;
// calculate factor
Vector3 dir = level.Vec3Diff(Source.pos,a.Vec3Offset(0,0,a.Height/2));
double dist = dir.length();
// intersecting, randomize direction
if ( dir.length() <= double.epsilon )
{
double ang = FRandom[DoBlast](0,360);
double pt = FRandom[DoBlast](-90,90);
dir = (cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt));
}
dir /= dist;
dist = clamp(dist-FullDamageRadius,0,min(dist,ExplosionRadius));
double damagescale = 1.-clamp((dist-a.Radius)*brange,0.,1.);
double mm = MomentumTransfer*damagescale;
// no knockback if massive/unpushable
if ( (abs(mm) > 0.) && !a.bCANNOTPUSH && (a.Mass < 10000000) )
{
Vector3 Momentum = dir*mm;
if ( (a.pos.z <= a.floorz) || !a.TestMobjZ() )
Momentum.z = max(Momentum.z,.1*Momentum.length());
Momentum /= Thinker.TICRATE*max(50,a.Mass); // prevent tiny things from getting yeeted at warp speed
a.vel += Momentum;
}
// hit it
int dmg = int(Damage*damagescale);
if ( dmg <= 0 ) continue; // no harm
int ndmg = a.DamageMobj(Instigator,Source,dmg,(DamageType=='')?Source.DamageType:DamageType,DMG_EXPLOSION,atan2(-dir.y,-dir.x));
a.TraceBleed((ndmg>0)?ndmg:dmg,Source);
}
// TODO destructible geometry support
}
static void DoSwing( Actor target, Vector2 dir, double initial, double inc, int steps, int mode = 0, int delay = 0, double rmul = 1.0 )
{
let s = new("Swinger");

View file

@ -341,8 +341,7 @@ Class EvisceratorProj : Actor
A_SprayDecal("BigScorch",50);
A_NoGravity();
A_SetScale(3.5);
SWWMHandler.DoBlast(self,240,120000);
A_Explode(150,240);
SWWMHandler.DoExplosion(self,150,120000,240);
A_QuakeEx(6,6,6,20,0,1200,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.7);
A_StartSound("eviscerator/shell",CHAN_WEAPON,attenuation:.5);
A_StartSound("eviscerator/shell",CHAN_VOICE,attenuation:.3);

View file

@ -257,7 +257,6 @@ Class YnykronImpact : Actor
+NODAMAGETHRUST;
+FORCERADIUSDMG;
+FORCEXYBILLBOARD;
+OLDRADIUSDMG;
+EXTREMEDEATH;
+NOINTERACTION;
}
@ -354,10 +353,8 @@ Class YnykronImpact : Actor
Super.Tick();
if ( isFrozen() || (rad <= 0) ) return;
specialf1 += .1;
SWWMHandler.DoBlast(self,rad/4,-150*specialf1,target);
SWWMHandler.DoBlast(self,rad/8,-50*specialf1);
A_Explode(int(150*specialf1),rad/4,0);
A_Explode(int(50*specialf1),rad/8);
SWWMHandler.DoExplosion(self,150*specialf1,-150*specialf1,rad/4,ignoreme:target);
SWWMHandler.DoExplosion(self,50*specialf1,-50*specialf1,rad/8);
rad += 5;
if ( specialf1 > 1. )
{

View file

@ -54,7 +54,7 @@ Class AirBullet : FastProjectile
s.alpha *= .2;
}
bAMBUSH = true;
A_Explode(GetMissileDamage(0,0),80,0);
SWWMHandler.DoExplosion(self,GetMissileDamage(0,0),0,80,ignoreme:target);
bAMBUSH = false;
tcnt++;
if ( tcnt < 2 ) return;
@ -74,7 +74,7 @@ Class AirBullet : FastProjectile
if ( (target.pos.z > target.floorz) && target.TestMobjZ() ) mm *= 1.6;
SWWMHandler.DoKnockback(target,dir,mm);
}
SWWMHandler.DoBlast(self,400,100000);
SWWMHandler.DoExplosion(self,0,100000,400,ignoreme:target);
A_QuakeEx(6,6,6,20,0,250,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:1.);
A_StartSound("deepimpact/bullethit",CHAN_VOICE,CHANF_DEFAULT,1.,.3);
A_SprayDecal("ImpactMark");

View file

@ -572,8 +572,7 @@ Class BigPunchSplash : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMHandler.DoBlast(self,120,40000,target);
A_Explode(special1,120,0);
SWWMHandler.DoExplosion(self,special1,40000,120,ignoreme:target);
Destroy();
}
}

View file

@ -1876,7 +1876,7 @@ Class DemolitionistRadiusShockwave : Actor
{
RenderStyle "Translucent";
Speed 15;
DamageFunction int(50*alpha);
DamageFunction int(100*alpha);
DamageType "GroundPound";
Radius 16;
Height 8;
@ -1911,7 +1911,7 @@ Class DemolitionistRadiusShockwave : Actor
SetZ(floorz);
Spawn("InvisibleSplasher",Vec3Offset(0,0,2));
let s = Spawn("DemolitionistRadiusShockwaveTail",pos);
s.vel = vel*.8;
s.vel = vel*.2;
s.scale = scale;
s.alpha = alpha;
s.angle = angle;

View file

@ -465,10 +465,7 @@ Class DragonBreathArm : Actor
l.target = p;
}
if ( !(ReactionTime%2) )
{
SWWMHandler.DoBlast(self,150-6*reactiontime,1000+200*reactiontime,bHITOWNER?null:target);
A_Explode(1+int(reactiontime/1.5),150-6*reactiontime,bHITOWNER?XF_HURTSOURCE:0);
}
SWWMHandler.DoExplosion(self,1+(reactiontime/1.5),1000+200*reactiontime,150-6*reactiontime,ignoreme:bHITOWNER?null:target);
double spd = vel.length();
vel = (vel*.4+(FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2))).unit()*spd;
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,5);
@ -584,8 +581,7 @@ Class SaltImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(6000);
SWWMHandler.DoBlast(self,120,15000);
A_Explode(25+special2*5,120);
SWWMHandler.DoExplosion(self,25+special2*5,15000,120);
A_QuakeEx(3,3,3,10,0,250,"",QF_RELATIVE|QF_SCALEDOWN,falloff:150,rollintensity:0.2);
A_StartSound("spreadgun/salt",CHAN_VOICE,attenuation:.35);
A_SprayDecal("ShockMarkSmall",-172);
@ -765,10 +761,7 @@ Class SaltBeam : Actor
if ( isFrozen() ) return;
A_FadeOut(.04);
if ( Random[Spreadgun](-2,args[2]/10) == 0 )
{
SWWMHandler.DoBlast(self,64,5000,target);
A_Explode(5+Accuracy,64,0);
}
SWWMHandler.DoExplosion(self,5+Accuracy,5000,64);
args[2]++;
if ( ((special2%5) || args[2]) && !special1 ) SpreadOut();
if ( !CheckNoDelay() || (tics == -1) ) return;
@ -1420,10 +1413,7 @@ Class TheBall : Actor
}
}
if ( crit )
{
SWWMHandler.DoBlast(self,150,25000,target);
A_Explode(dmg/2,150,0);
}
SWWMHandler.DoExplosion(self,dmg/2,25000,150,ignoreme:target);
// only rip shootables
if ( (slamforce > girth) && is_schutt )
{
@ -1629,8 +1619,7 @@ Class GoldenImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(40000);
SWWMHandler.DoBlast(self,500,40000);
A_Explode(7777,600,fulldamagedistance:500);
SWWMHandler.DoExplosion(self,7777,40000,600,500);
A_QuakeEx(9,9,9,40,0,5000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollintensity:1.5);
A_StartSound("spreadgun/goldexpl",CHAN_VOICE,attenuation:.3);
A_StartSound("spreadgun/goldexpl",CHAN_WEAPON,attenuation:.15);
@ -1757,8 +1746,7 @@ Class GoldenSubImpact : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMHandler.DoBlast(self,300,30000);
A_Explode(777,400,fulldamagedistance:300);
SWWMHandler.DoExplosion(self,777,30000,400,300);
A_QuakeEx(7,7,7,20,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:200,rollintensity:.8);
A_SprayDecal("BigScorch",-172);
Scale *= FRandom[ExploS](0.8,1.1);
@ -1883,8 +1871,7 @@ Class GoldenSubSubImpact : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMHandler.DoBlast(self,100,20000);
A_Explode(77,200,fulldamagedistance:100);
SWWMHandler.DoExplosion(self,77,20000,200,100);
A_QuakeEx(4,4,4,15,0,1000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:100,rollintensity:.4);
A_SprayDecal("Scorch",-172);
Scale *= FRandom[ExploS](0.8,1.1);

View file

@ -276,8 +276,7 @@ Class BigBiospark : Actor
{
A_StopSound(CHAN_VOICE);
A_AlertMonsters(15000);
SWWMHandler.DoBlast(self,300,200000);
A_Explode(450,300);
SWWMHandler.DoExplosion(self,450,200000,300);
A_QuakeEx(9,9,9,30,0,1400,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollIntensity:1.5);
A_StartSound("biospark/bighit",CHAN_ITEM,attenuation:.4);
A_StartSound("biospark/bighit",CHAN_WEAPON,attenuation:.3);
@ -331,8 +330,8 @@ Class BigBiospark : Actor
if ( special1 > 40 ) return;
double factor = (40-special1)/40.;
double invfct = 1.-factor;
SWWMHandler.DoBlast(self,500*invfct,-8000*factor);
A_Explode(int(150*factor),int(250*invfct));
SWWMHandler.DoExplosion(self,150*factor,0.,250*invfct);
SWWMHandler.DoExplosion(self,0,-8000*factor,500*invfct);
int numpt = int(Random[ExploS](16,32)*factor);
for ( int i=0; i<numpt; i++ )
{
@ -537,8 +536,7 @@ Class BiosparkBall : Actor
{
A_StopSound(CHAN_VOICE);
A_AlertMonsters(5000);
SWWMHandler.DoBlast(self,150,120000);
A_Explode(50,150);
SWWMHandler.DoExplosion(self,50,120000,150);
A_QuakeEx(6,6,6,16,0,800,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.8);
A_StartSound("biospark/hit",CHAN_ITEM,attenuation:.8);
A_StartSound("biospark/hit",CHAN_WEAPON,attenuation:.6);
@ -590,8 +588,8 @@ Class BiosparkBall : Actor
if ( special1 > 30 ) return;
double factor = (30-special1)/30.;
double invfct = 1.-factor;
SWWMHandler.DoBlast(self,300*invfct,-5000*factor);
A_Explode(int(30*factor),int(150*invfct));
SWWMHandler.DoExplosion(self,30*factor,0.,150*invfct);
SWWMHandler.DoExplosion(self,0,-5000*factor,300*invfct);
int numpt = int(Random[ExploS](16,32)*factor);
for ( int i=0; i<numpt; i++ )
{
@ -701,8 +699,7 @@ Class BiosparkBeamImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(2000);
SWWMHandler.DoBlast(self,100,120000);
A_Explode(30,100);
SWWMHandler.DoExplosion(self,30,120000,100);
A_QuakeEx(3,3,3,12,0,800,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.4);
A_StartSound("biospark/beamhit",CHAN_ITEM,attenuation:1.1);
A_StartSound("biospark/beamhit",CHAN_WEAPON,attenuation:.8);
@ -755,8 +752,8 @@ Class BiosparkBeamImpact : Actor
if ( special1 > 30 ) return;
double factor = (30-special1)/30.;
double invfct = 1.-factor;
SWWMHandler.DoBlast(self,100*invfct,-5000*factor);
A_Explode(int(10*factor),int(50*invfct));
SWWMHandler.DoExplosion(self,10*factor,0.,50*invfct);
SWWMHandler.DoExplosion(self,0.,-5000*factor,100*invfct);
int numpt = int(Random[ExploS](8,16)*factor);
for ( int i=0; i<numpt; i++ )
{
@ -837,8 +834,7 @@ Class BiosparkComboImpactSub : Actor
{
Super.PostBeginPlay();
if ( !bAMBUSH ) return;
SWWMHandler.DoBlast(self,300,10000);
A_Explode(200,300);
SWWMHandler.DoExplosion(self,200,10000,300);
}
States
{
@ -891,8 +887,7 @@ Class BiosparkComboImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(6000);
SWWMHandler.DoBlast(self,bAMBUSH?1200:700,480000);
A_Explode(bAMBUSH?1600+Args[0]*100:1500,bAMBUSH?1200:700);
SWWMHandler.DoExplosion(self,bAMBUSH?(1600+Args[0]*100):1500,480000,bAMBUSH?1200:700);
A_QuakeEx(9,9,9,25,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:600,rollIntensity:1.5);
A_StartSound("biospark/bighit",CHAN_ITEM,attenuation:.4);
A_StartSound("biospark/bighit",CHAN_WEAPON,attenuation:.3);
@ -965,8 +960,8 @@ Class BiosparkComboImpact : Actor
factor *= 1.5;
invfct *= 1.5;
}
SWWMHandler.DoBlast(self,800*invfct,-10000*factor);
A_Explode(int((1500+Args[0]*50)*factor),int(600*invfct));
SWWMHandler.DoExplosion(self,(1500+Args[0]*50)*factor,0.,600*invfct);
SWWMHandler.DoExplosion(self,0.,-10000*factor,800*invfct);
int numpt = int(Random[ExploS](8,16)*factor);
for ( int i=0; i<numpt; i++ )
{
@ -1770,8 +1765,7 @@ Class BiosparkCore : Actor
bNOGRAVITY = true;
A_SetRenderStyle(1.,STYLE_Add);
A_AlertMonsters(5000);
SWWMHandler.DoBlast(self,150,120000);
A_Explode(50,150);
SWWMHandler.DoExplosion(self,50,120000,150);
A_QuakeEx(6,6,6,16,0,800,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.8);
Scale *= FRandom[ExploS](0.8,1.1);
Scale.x *= RandomPick[ExploS](-1,1);
@ -1820,8 +1814,8 @@ Class BiosparkCore : Actor
if ( special2 > 30 ) return;
double factor = (30-special2)/30.;
double invfct = 1.-factor;
SWWMHandler.DoBlast(self,300*invfct,-5000*factor);
A_Explode(int(30*factor),int(150*invfct));
SWWMHandler.DoExplosion(self,0.,-5000*factor,300*invfct);
SWWMHandler.DoExplosion(self,30*factor,0.,150*invfct);
int numpt = int(Random[ExploS](16,32)*factor);
for ( int i=0; i<numpt; i++ )
{

View file

@ -66,8 +66,7 @@ Class ExplodiumMagArm : Actor
{
A_CountDown();
Spawn("ExplodiumMagTrail",pos);
SWWMHandler.DoBlast(self,30+2*reactiontime,3000+500*reactiontime);
A_Explode(2+reactiontime/3,30+2*reactiontime);
SWWMHandler.DoExplosion(self,2+reactiontime/3,3000+500*reactiontime,30+2*reactiontime);
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;
@ -136,8 +135,7 @@ Class ExplodiumMagProj : Actor
A_SetRenderStyle(1.,STYLE_Add);
Scale *= 2.+.2*special1;
A_AlertMonsters(6000);
SWWMHandler.DoBlast(self,120+30*special1,80000+8000*special1);
A_Explode(20+15*special1,120+30*special1);
SWWMHandler.DoExplosion(self,20+15*special1,80000+8000*special1,120+30*special1);
A_QuakeEx(9,9,9,30,0,400+80*special1,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollintensity:2.);
A_StartSound("explodium/maghit",CHAN_VOICE,attenuation:.35);
A_StartSound("explodium/maghit",CHAN_WEAPON,attenuation:.2);
@ -231,8 +229,7 @@ Class ExplodiumBulletImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(3000);
SWWMHandler.DoBlast(self,120,80000);
A_Explode(25,120);
SWWMHandler.DoExplosion(self,25,80000,120);
A_QuakeEx(4,4,4,10,0,250,"",QF_RELATIVE|QF_SCALEDOWN,falloff:150,rollintensity:0.2);
A_StartSound("explodium/hit",CHAN_VOICE,attenuation:.6);
A_StartSound("explodium/hit",CHAN_WEAPON,attenuation:.3);

View file

@ -252,8 +252,7 @@ Class CandyPop : Actor
Spawn:
BLPF B 3 NoDelay
{
SWWMHandler.DoBlast(self,120,60000);
A_Explode(200,120);
SWWMHandler.DoExplosion(self,200,60000,120);
Scale *= FRandom[ExploS](0.6,1.8);
Scale.x *= RandomPick[ExploS](-1,1);
Scale.y *= RandomPick[ExploS](-1,1);
@ -317,8 +316,7 @@ Class TinyCandyPop : CandyPop
Spawn:
BLPF B 3 NoDelay
{
SWWMHandler.DoBlast(self,80,32000);
A_Explode(60,80);
SWWMHandler.DoExplosion(self,60,32000,80);
Scale *= FRandom[ExploS](0.6,1.8);
Scale.x *= RandomPick[ExploS](-1,1);
Scale.y *= RandomPick[ExploS](-1,1);
@ -376,10 +374,9 @@ Class CandyMagArm : Actor
{
A_CountDown();
Spawn("CandyMagTrail",pos);
SWWMHandler.DoBlast(self,50+6*reactiontime,3000+800*reactiontime);
SWWMHandler.DoExplosion(self,80+reactiontime*7,3000+800*reactiontime,50+6*reactiontime);
double spd = vel.length();
vel = (vel*.1+(FRandom[ExploS](-.7,.7),FRandom[ExploS](-.7,.7),FRandom[ExploS](-.7,.7))).unit()*spd;
A_Explode(80+reactiontime*7,50+6*reactiontime);
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;
@ -453,10 +450,9 @@ Class CandyMagArmBig : CandyMagArm
{
ReactionTime--;
Spawn("CandyMagTrailBig",pos);
SWWMHandler.DoBlast(self,100+8*reactiontime,3000+900*reactiontime);
SWWMHandler.DoExplosion(self,120+reactiontime*10,3000+900*reactiontime,100+8*reactiontime);
double spd = vel.length();
vel = (vel*.1+(FRandom[ExploS](-.5,.5),FRandom[ExploS](-.5,.5),FRandom[ExploS](-.5,.5))).unit()*spd;
A_Explode(120+reactiontime*10,100+8*reactiontime);
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;
@ -533,8 +529,7 @@ Class CandyGunProj : Actor
A_SetRenderStyle(1.,STYLE_Add);
Scale *= 6.+.2*special1;
A_AlertMonsters(40000);
SWWMHandler.DoBlast(self,300+20*special1,80000+8000*special1);
A_Explode(3500+500*special1,300+20*special1);
SWWMHandler.DoExplosion(self,3500+500*special1,80000+8000*special1,300+20*special1);
A_QuakeEx(9,9,9,70,0,1500+100*special1,"",QF_RELATIVE|QF_SCALEDOWN,falloff:1200,rollintensity:2.);
A_StartSound("candygun/gunhit",CHAN_VOICE,attenuation:.24);
A_StartSound("candygun/gunhit",CHAN_WEAPON,attenuation:.12);
@ -644,8 +639,7 @@ Class CandyMagProj : Actor
A_SetRenderStyle(1.,STYLE_Add);
Scale *= 3.+.2*special1;
A_AlertMonsters(20000);
SWWMHandler.DoBlast(self,250+25*special1,80000+8000*special1);
A_Explode(700+600*special1,250+25*special1);
SWWMHandler.DoExplosion(self,700+600*special1,80000+8000*special1,250+25*special1);
A_QuakeEx(9,9,9,30,0,500+80*special1,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollintensity:2.);
A_StartSound("candygun/maghit",CHAN_VOICE,attenuation:.24);
A_StartSound("candygun/maghit",CHAN_WEAPON,attenuation:.12);
@ -739,8 +733,7 @@ Class CandyBulletImpact : Actor
{
Super.PostBeginPlay();
A_AlertMonsters(9000);
SWWMHandler.DoBlast(self,200,48000);
A_Explode(700,200);
SWWMHandler.DoExplosion(self,700,48000,200);
A_QuakeEx(6,6,6,15,0,300,"",QF_RELATIVE|QF_SCALEDOWN,falloff:200,rollintensity:0.2);
A_StartSound("candygun/hit",CHAN_VOICE,attenuation:.25);
A_StartSound("candygun/hit",CHAN_WEAPON,attenuation:.5);

View file

@ -56,8 +56,7 @@ Class SilverAirRip : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMHandler.DoBlast(self,80,2000.,target);
A_Explode(40,80,0);
SWWMHandler.DoExplosion(self,40,2000,80,ignoreme:target);
Destroy();
}
}
@ -79,8 +78,7 @@ Class SilverImpact : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
SWWMHandler.DoBlast(self,100,8000.);
A_Explode(100,100);
SWWMHandler.DoExplosion(self,100,8000,100);
if ( swwm_extraalert ) A_AlertMonsters(2500);
A_QuakeEx(4,4,4,20,0,400,"",QF_RELATIVE|QF_SCALEDOWN,falloff:100,rollIntensity:.9);
if ( special1 )