Allow Explodium/Candy mags to bounce at certain angles.
This commit is contained in:
parent
79a9fc057d
commit
04b0ab2f68
3 changed files with 67 additions and 6 deletions
|
|
@ -129,6 +129,12 @@ Class ExplodiumMagProj : Actor
|
|||
+NODAMAGETHRUST;
|
||||
+FORCERADIUSDMG;
|
||||
+FORCEXYBILLBOARD;
|
||||
+BOUNCEONFLOORS;
|
||||
+BOUNCEONCEILINGS;
|
||||
+BOUNCEONWALLS;
|
||||
+USEBOUNCESTATE;
|
||||
BounceFactor 0.4;
|
||||
WallBounceFactor 0.4;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -152,7 +158,7 @@ Class ExplodiumMagProj : Actor
|
|||
Scale *= FRandom[ExploS](0.8,1.1);
|
||||
Scale.x *= RandomPick[ExploS](-1,1);
|
||||
Scale.y *= RandomPick[ExploS](-1,1);
|
||||
int numpt = Random[ExploS](16,32);
|
||||
int numpt = Random[ExploS](16,24);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,6);
|
||||
|
|
@ -163,21 +169,21 @@ Class ExplodiumMagProj : Actor
|
|||
s.scale *= 2.8;
|
||||
s.alpha *= .4;
|
||||
}
|
||||
numpt = Random[ExploS](10,20);
|
||||
numpt = Random[ExploS](10,15);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](2,12);
|
||||
let s = Spawn("SWWMSpark",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
numpt = Random[ExploS](20,30);
|
||||
numpt = Random[ExploS](15,25);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](2,24);
|
||||
let s = Spawn("SWWMChip",pos);
|
||||
s.vel = pvel;
|
||||
}
|
||||
numpt = int(Random[ExploS](3,5)*(1.+.4*special1));
|
||||
numpt = int(Random[ExploS](2,3)+(.6*special1));
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
let s = Spawn("ExplodiumMagArm",pos);
|
||||
|
|
@ -186,6 +192,16 @@ Class ExplodiumMagProj : Actor
|
|||
Spawn("ExploLight2",pos);
|
||||
if ( swwm_omnibust ) BusterWall.ProjectileBust(self,20+15*special1,cvel);
|
||||
}
|
||||
void A_CheckBounce()
|
||||
{
|
||||
if ( (vel.length() > 4) && (vel.unit() dot cvel > .5) )
|
||||
{
|
||||
bHITOWNER = true;
|
||||
A_StartSound("explodium/mag");
|
||||
return;
|
||||
}
|
||||
ExplodeMissile();
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -196,6 +212,9 @@ Class ExplodiumMagProj : Actor
|
|||
if ( vel.length() > 0. ) cvel = vel.unit();
|
||||
}
|
||||
Wait;
|
||||
Bounce:
|
||||
XZW1 A 0 A_CheckBounce();
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 0 A_BlowUp();
|
||||
XEX1 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] 1 Bright;
|
||||
|
|
@ -260,6 +279,10 @@ Class ExplodiumMagAttach : ExplodiumMagProj
|
|||
default
|
||||
{
|
||||
+MOVEWITHSECTOR;
|
||||
-BOUNCEONFLOORS;
|
||||
-BOUNCEONCEILINGS;
|
||||
-BOUNCEONWALLS;
|
||||
-USEBOUNCESTATE;
|
||||
Speed 15;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -525,6 +525,12 @@ Class CandyGunProj : Actor
|
|||
+FORCERADIUSDMG;
|
||||
+FORCEXYBILLBOARD;
|
||||
+FOILINVUL;
|
||||
+BOUNCEONFLOORS;
|
||||
+BOUNCEONCEILINGS;
|
||||
+BOUNCEONWALLS;
|
||||
+USEBOUNCESTATE;
|
||||
BounceFactor 0.3;
|
||||
WallBounceFactor 0.3;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -583,6 +589,16 @@ Class CandyGunProj : Actor
|
|||
Spawn("CandyRing3",pos);
|
||||
if ( swwm_omnibust ) BusterWall.ProjectileBust(self,5000+900*special1,cvel);
|
||||
}
|
||||
void A_CheckBounce()
|
||||
{
|
||||
if ( (vel.length() > 4) && (vel.unit() dot cvel > .5) )
|
||||
{
|
||||
bHITOWNER = true;
|
||||
A_StartSound("explodium/mag");
|
||||
return;
|
||||
}
|
||||
ExplodeMissile();
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -593,6 +609,9 @@ Class CandyGunProj : Actor
|
|||
if ( vel.length() > 0. ) cvel = vel.unit();
|
||||
}
|
||||
Wait;
|
||||
Bounce:
|
||||
XZW1 A 0 A_CheckBounce();
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 0 A_BlowUp();
|
||||
XEX3 AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSS 1 Bright
|
||||
|
|
@ -641,6 +660,12 @@ Class CandyMagProj : Actor
|
|||
+FORCERADIUSDMG;
|
||||
+FORCEXYBILLBOARD;
|
||||
+FOILINVUL;
|
||||
+BOUNCEONFLOORS;
|
||||
+BOUNCEONCEILINGS;
|
||||
+BOUNCEONWALLS;
|
||||
+USEBOUNCESTATE;
|
||||
BounceFactor 0.4;
|
||||
WallBounceFactor 0.4;
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -699,6 +724,16 @@ Class CandyMagProj : Actor
|
|||
Spawn("CandyRing2",pos);
|
||||
if ( swwm_omnibust ) BusterWall.ProjectileBust(self,1000+900*special1,cvel);
|
||||
}
|
||||
void A_CheckBounce()
|
||||
{
|
||||
if ( (vel.length() > 4) && (vel.unit() dot cvel > .5) )
|
||||
{
|
||||
bHITOWNER = true;
|
||||
A_StartSound("explodium/mag");
|
||||
return;
|
||||
}
|
||||
ExplodeMissile();
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -709,6 +744,9 @@ Class CandyMagProj : Actor
|
|||
if ( vel.length() > 0. ) cvel = vel.unit();
|
||||
}
|
||||
Wait;
|
||||
Bounce:
|
||||
XZW1 A 0 A_CheckBounce();
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 0 A_BlowUp();
|
||||
XEX3 AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSS 1 Bright
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue