Remove unnecessary uses of "action" and "invoker".

This commit is contained in:
Mari the Deer 2022-11-26 11:57:17 +01:00
commit 23947d8471
11 changed files with 99 additions and 98 deletions

View file

@ -104,7 +104,7 @@ Class QuadTrail : SWWMNonInteractiveActor
roll = FRandom[ExploS](0,360);
SetState(SpawnState+Random[ExploS](0,19));
}
action void A_Flame()
void A_Flame()
{
vel *= .9;
A_SetScale(scale.x*.96);
@ -1050,7 +1050,7 @@ Class OnFireTrail : SWWMNonInteractiveActor
roll = FRandom[ExploS](0,360);
SetState(SpawnState+Random[ExploS](0,39));
}
action void A_Flame()
void A_Flame()
{
special1++;
if ( waterlevel > 0 )

View file

@ -654,7 +654,7 @@ Class PartyTime : SWWMNonInteractiveActor
}
SetOrigin(target.pos,false);
}
action void A_Confetti()
void A_Confetti()
{
if ( !bAMBUSH && !bSTANDSTILL ) A_StartSound("misc/tada",CHAN_ITEM);
double ang, pt;
@ -1118,7 +1118,7 @@ Class Chancebox : Actor
}
}
action void A_DropSomething()
void A_DropSomething()
{
Array<Class <SWWMCollectible> > candidates;
candidates.Clear();
@ -1139,7 +1139,7 @@ Class Chancebox : Actor
if ( f < candidates.Size() )
candidates.Delete(f);
}
if ( (candidates.Size() <= 0) || invoker.dud )
if ( (candidates.Size() <= 0) || dud )
{
// no collectible candidates? just burst into treats
if ( (scale.x > .5) && (Random[Chancebox](0,int(9*scale.x*scale.x)) < 3) )
@ -1186,7 +1186,7 @@ Class Chancebox : Actor
s.scale *= 2.4;
}
}
action void A_Confetti()
void A_Confetti()
{
A_StartSound("misc/tada",CHAN_ITEM,pitch:1./scale.x);
double ang, pt;

View file

@ -2234,7 +2234,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
{
Vector3 nextpos, nextdir;
action void A_Trace()
void A_Trace()
{
tics = bMISSILEMORE?2:1;
Vector3 x, y, z;
@ -2263,7 +2263,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
t.hitlist[i].hitactor.Howl();
}
}
invoker.nextpos = level.Vec3Offset(pos,x*speed);
nextpos = level.Vec3Offset(pos,x*speed);
if ( !bSTANDSTILL && (!tracer || !tracer.bSHOOTABLE || (tracer.Health <= 0) || ((tracer.bBOSS || tracer.FindInventory("BossMarker")) && !bMISSILEMORE)) )
{
ReactionTime--;
@ -2278,7 +2278,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
if ( tracer )
{
Vector3 destofs = bMISSILEMORE?tracer.Vec3Offset(0,0,tracer.Height/2.):tracer.Vec3Offset(FRandom[Mykradvo](-1.2,1.2)*tracer.Radius,FRandom[Mykradvo](-1.2,1.2)*tracer.Radius,FRandom[Mykradvo](-.1,1.1)*tracer.height);
Vector3 dirto = level.Vec3Diff(invoker.nextpos,destofs);
Vector3 dirto = level.Vec3Diff(nextpos,destofs);
double dist = dirto.length();
if ( dist > 1 )
{
@ -2288,9 +2288,9 @@ Class MykradvoTendril : SWWMNonInteractiveActor
// early split
if ( dist < speed ) bMISSILEEVENMORE = true;
}
invoker.nextdir = dir;
nextdir = dir;
}
action void A_Spread()
void A_Spread()
{
if ( bMISSILEMORE && bMISSILEEVENMORE )
{
@ -2300,7 +2300,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2;
for ( int i=0; i<ntendies; i++ )
{
let r = Spawn("MykradvoSmallTendril",invoker.nextpos);
let r = Spawn("MykradvoSmallTendril",nextpos);
double a = FRandom[Mykradvo](0,360), s = FRandom[Mykradvo](0.,1.);
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
r.angle = atan2(sdir.y,sdir.x);
@ -2323,7 +2323,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
{
double a = FRandom[ExploS](0,360), s = FRandom[ExploS](0,1.);
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
let r = Spawn("MykradvoSmallNullTendril",invoker.nextpos);
let r = Spawn("MykradvoSmallNullTendril",nextpos);
r.angle = atan2(sdir.y,sdir.x);
r.pitch = asin(-sdir.z);
r.target = target;
@ -2333,9 +2333,9 @@ Class MykradvoTendril : SWWMNonInteractiveActor
}
return;
}
let b = Spawn(GetClass(),invoker.nextpos);
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
b.pitch = asin(-invoker.nextdir.z);
let b = Spawn(GetClass(),nextpos);
b.angle = atan2(nextdir.y,nextdir.x);
b.pitch = asin(-nextdir.z);
b.target = target;
b.tracer = tracer;
b.special1 = special1+1;
@ -2657,7 +2657,7 @@ Class MykradvoBurst : SWWMNonInteractiveActor
{
Spawn:
XEX4 ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ 2 Bright;
TNT1 A 1 A_JumpIf(!IsActorPlayingSound(CHAN_VOICE)&&!(invoker.targets.Size()),1);
TNT1 A 1 A_JumpIf(!IsActorPlayingSound(CHAN_VOICE)&&!(targets.Size()),1);
Wait;
TNT1 A 1;
Stop;
@ -2772,7 +2772,7 @@ Class Mykradvo : Inventory
return true;
}
action void A_Zap()
void A_Zap()
{
int numpt = Random[ExploS](2,4);
for ( int i=0; i<numpt; i++ )

View file

@ -7,7 +7,7 @@ Class mkBlood : SWWMNonInteractiveActor
{
+PUFFGETSOWNER;
}
action void A_Bleed( int str = 1 )
void A_Bleed( int str = 1 )
{
if ( !target ) return;
let b = Spawn("mkBloodSpray",pos);
@ -526,7 +526,7 @@ Class mkFlyingGib : Actor
return true;
}
action void A_Bleed()
void A_Bleed()
{
if ( vel.length() < .5 ) ExplodeMissile(null,null);
else
@ -537,9 +537,9 @@ Class mkFlyingGib : Actor
dir = (dir+SWWMUtility.Vec3FromAngles(FRandom[Blood](0,360),FRandom[Blood](-90,90))*.3).unit();
vel = dir*spd;
}
invoker.rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
if ( invoker.lastbleed > level.maptime ) return;
invoker.lastbleed = level.maptime+5;
rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
if ( lastbleed > level.maptime ) return;
lastbleed = level.maptime+5;
TraceBleedAngle(int(vel.length()),angle+180,-pitch);
}
@ -594,7 +594,7 @@ Class mkFlyingGib : Actor
// floor drop
let b = Spawn("mkBloodDrop",pos);
b.scale *= 2.0;
b.SetShade(invoker.shadecol);
b.SetShade(shadecol);
}
Stop;
}

View file

@ -168,7 +168,7 @@ Class LoveHeart : Actor
return -1;
}
action void A_HeartTick()
void A_HeartTick()
{
special1++;
if ( !(special1%3) && (special2 > 0) ) special2--;
@ -432,9 +432,9 @@ Class LoveHeart : Actor
}
}
}
action void A_HeartBurst()
void A_HeartBurst()
{
invoker.CheckDefaceTexture();
CheckDefaceTexture();
// use line
if ( BlockingLine )
{
@ -481,7 +481,7 @@ Class LoveHeart : Actor
s.alpha *= 2;
}
}
action void A_HeartDie()
void A_HeartDie()
{
scale *= 1.2;
A_FadeOut();

View file

@ -379,7 +379,7 @@ Class EvisceratorChunk : Actor
XZW1 # 1 A_FadeOut();
Wait;
XDeath:
TNT1 A 35 { invoker.justdied = true; }
TNT1 A 35 { justdied = true; }
Stop;
}
}
@ -448,11 +448,11 @@ Class EvisceratorProj : Actor
if ( waterlevel <= 0 ) vel.z += 3;
heat = 1.5;
}
action void A_EvisExplode()
void A_EvisExplode()
{
if ( target && tracer && (tracer.bIsMonster||tracer.player) && tracer.IsHostile(target) )
{
double dist = level.Vec3Diff(pos,invoker.startpos).length();
double dist = level.Vec3Diff(pos,startpos).length();
SWWMUtility.AchievementProgress("lead",int(dist),target.player);
}
bForceXYBillboard = true;
@ -544,7 +544,7 @@ Class EvisceratorProj : Actor
Spawn("EvisceratorRing",pos);
if ( swwm_omnibust ) BusterWall.ProjectileBust(self,150,SWWMUtility.Vec3FromAngles(angle,pitch));
}
action void A_SubExpl()
void A_SubExpl()
{
special1++;
if ( special1 > 8 ) return;
@ -586,8 +586,8 @@ Class EvisceratorProj : Actor
Spawn:
XZW1 A 1
{
invoker.heat -= 0.004+0.0004*vel.length();
if ( invoker.heat > 0 )
heat -= 0.004+0.0004*vel.length();
if ( heat > 0 )
{
let s = Spawn("SWWMHalfSmoke",pos);
s.alpha *= heat;

View file

@ -1486,7 +1486,7 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
Vector3 nextpos, nextdir;
Vector3 destpos;
action void A_Trace()
void A_Trace()
{
let t = new("CandyBeamTracer");
t.hitlist.Clear();
@ -1533,17 +1533,17 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
s.pitch = asin(-normal.z);
if ( swwm_omnibust ) BusterWall.Bust(t.Results,GetMissileDamage(0,0),target,t.Results.HitVector,t.Results.HitPos.z);
}
invoker.nextpos = t.Results.HitPos;
nextpos = t.Results.HitPos;
bAMBUSH = true;
speed = t.Results.Distance; // shortens in minimap
return;
}
invoker.nextpos = level.Vec3Offset(pos,x*speed);
nextpos = level.Vec3Offset(pos,x*speed);
double a = FRandom[Ynykron](0,360), s = FRandom[Ynykron](0.,.8);
dir = SWWMUtility.ConeSpread(dir,y,z,a,s);
if ( !special1 )
{
invoker.destpos = level.Vec3Offset(pos,x*10000);
destpos = level.Vec3Offset(pos,x*10000);
// calculate the closest strike point to home in onto
Vector3 strikepoints[32];
double closest = 10000.;
@ -1557,23 +1557,23 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
strikepoints[i] = d.HitLocation;
if ( d.Distance < closest )
{
invoker.destpos = strikepoints[i];
destpos = strikepoints[i];
closest = d.Distance;
}
}
}
Vector3 dirto = level.Vec3Diff(invoker.nextpos,invoker.destpos);
Vector3 dirto = level.Vec3Diff(nextpos,destpos);
double dist = dirto.length();
if ( dist > 10 )
{
dirto /= dist;
dir = (dir+.8*dirto*(clamp(1.-(dist/1500.),0.,1.)**1.5)).unit();
}
invoker.nextdir = dir;
nextdir = dir;
}
action void A_Spread( Sound arcsnd )
void A_Spread( Sound arcsnd )
{
Vector3 tdir = level.Vec3Diff(pos,invoker.nextpos);
Vector3 tdir = level.Vec3Diff(pos,nextpos);
if ( (GetClass() == 'YnykronLightningArc') && !Random[Ynykron](0,3) )
{
for ( int i=0; i<3; i++ )
@ -1587,18 +1587,18 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
r.pitch = asin(-sdir.z);
r.target = target;
r.special1 = 1;
YnykronLightningArc(r).destpos = invoker.destpos;
YnykronLightningArc(r).destpos = destpos;
r.ReactionTime += Random[Ynykron](-3,3);
}
}
if ( arcsnd != "" ) A_StartSound(arcsnd,CHAN_WEAPON);
if ( ((ReactionTime > 0) && (special1 > ReactionTime)) || bAMBUSH ) return;
let b = Spawn(GetClass(),invoker.nextpos);
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
b.pitch = asin(-invoker.nextdir.z);
let b = Spawn(GetClass(),nextpos);
b.angle = atan2(nextdir.y,nextdir.x);
b.pitch = asin(-nextdir.z);
b.target = target;
b.special1 = special1+1;
YnykronLightningArc(b).destpos = invoker.destpos;
YnykronLightningArc(b).destpos = destpos;
b.SetState(b.FindState("Trailer"));
}
override void PostBeginPlay()

View file

@ -142,7 +142,7 @@ Class GoldenImpact : SWWMNonInteractiveActor
Spawn("GExploLight",pos);
let r = Spawn("GExploRing",pos);
}
action void A_GoldSpread()
void A_GoldSpread()
{
special1++;
if ( (special1%4) || (special1 > 30) ) return;
@ -255,7 +255,7 @@ Class GoldenSubImpact : SWWMNonInteractiveActor
s.vel = pvel;
}
}
action void A_GoldSubSpread()
void A_GoldSubSpread()
{
special1++;
if ( (special1%2) || (special1 > 20) ) return;

View file

@ -1017,7 +1017,7 @@ Class BiosparkBeam : SWWMNonInteractiveActor
{
Vector3 nextpos, nextdir;
action void A_Trace()
void A_Trace()
{
let t = new("BiosparkTracer");
t.hitlist.Clear();
@ -1075,7 +1075,7 @@ Class BiosparkBeam : SWWMNonInteractiveActor
else normal = t.Results.HitSector.ceilingplane.Normal;
}
else normal *= 0;
invoker.nextpos = level.Vec3Offset(t.Results.HitPos,normal*8.);
nextpos = level.Vec3Offset(t.Results.HitPos,normal*8.);
if ( t.Results.HitType == TRACE_HasHitSky )
{
bAMBUSH = true;
@ -1084,7 +1084,7 @@ Class BiosparkBeam : SWWMNonInteractiveActor
}
if ( t.Results.HitType != TRACE_HitNone )
{
let s = Spawn("BiosparkBeamImpact",invoker.nextpos);
let s = Spawn("BiosparkBeamImpact",nextpos);
s.target = target;
s.angle = atan2(normal.y,normal.x);
s.pitch = asin(-normal.z);
@ -1100,7 +1100,7 @@ Class BiosparkBeam : SWWMNonInteractiveActor
let t = bt.Thing;
double dist;
if ( !t || (!(t is 'BiosparkHitbox') && (!t.bSHOOTABLE || (!t.bISMONSTER && !(t is 'BossBrain') && !t.player) || (t.Health <= 0) || (target && t.IsFriend(target)))) || ((dist=Distance3DSquared(t)) > 250000) || !CheckSight(t,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) continue;
Vector3 dirto = level.Vec3Diff(invoker.nextpos,t.Vec3Offset(0,0,t.height/2));
Vector3 dirto = level.Vec3Diff(nextpos,t.Vec3Offset(0,0,t.height/2));
if ( dir dot dirto < .2 ) continue;
if ( dist > closest ) continue;
closest = dist;
@ -1108,7 +1108,7 @@ Class BiosparkBeam : SWWMNonInteractiveActor
}
if ( tracer )
{
Vector3 dirto = level.Vec3Diff(invoker.nextpos,tracer.Vec3Offset(0,0,tracer.height/2));
Vector3 dirto = level.Vec3Diff(nextpos,tracer.Vec3Offset(0,0,tracer.height/2));
double dist = dirto.length();
if ( dist > 10 )
{
@ -1121,17 +1121,17 @@ Class BiosparkBeam : SWWMNonInteractiveActor
dir = (dir+SWWMUtility.Vec3FromAngles(FRandom[Sparkster](0,360),FRandom[Sparkster](-90,90))*FRandom[Sparkster](.8,.16)).unit();
else if ( bMISSILEMORE )
dir = (dir+SWWMUtility.Vec3FromAngles(FRandom[Sparkster](0,360),FRandom[Sparkster](-90,90))*FRandom[Sparkster](.02,.04)).unit();
invoker.nextdir = dir;
nextdir = dir;
}
action void A_Spread()
void A_Spread()
{
let c = Spawn("BiosparkChildBeam",pos);
c.angle = angle;
c.pitch = pitch;
if ( frame ) c.SetStateLabel("TrailSpawn");
c.roll = Random[Sparkster](0,7)*45;
Vector3 tdir = level.Vec3Diff(pos,invoker.nextpos);
Vector3 tdir = level.Vec3Diff(pos,nextpos);
int numpt = Random[Sparkster](-1,3);
for ( int i=0; i<numpt; i++ )
{
@ -1170,17 +1170,17 @@ Class BiosparkBeam : SWWMNonInteractiveActor
Spawn("SparkBeamLight",level.Vec3Offset(pos,tdir/2));
}
if ( bAMBUSH ) return;
let b = Spawn(GetClass(),invoker.nextpos);
let b = Spawn(GetClass(),nextpos);
b.frame = 1;
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
b.pitch = asin(-invoker.nextdir.z);
b.angle = atan2(nextdir.y,nextdir.x);
b.pitch = asin(-nextdir.z);
b.target = target;
b.special1 = special1+1;
b.bMISSILEMORE = bMISSILEMORE;
b.bMISSILEEVENMORE = bMISSILEEVENMORE;
}
action void A_Fade()
void A_Fade()
{
A_FadeOut(.05);
let t = new("BiosparkTracer");
@ -1358,7 +1358,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
{
Vector3 nextpos, nextdir;
action void A_Trace()
void A_Trace()
{
let t = new("CandyBeamTracer");
t.hitlist.Clear();
@ -1401,7 +1401,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
dir -= 2*normal*(dir dot normal);
}
else normal *= 0;
invoker.nextpos = level.Vec3Offset(t.Results.HitPos,normal);
nextpos = level.Vec3Offset(t.Results.HitPos,normal);
if ( t.Results.HitType != TRACE_HitNone ) speed = t.Results.Distance; // shortens in minimap
if ( t.Results.HitType == TRACE_HasHitSky )
{
@ -1413,7 +1413,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
dir = SWWMUtility.ConeSpread(dir,y,z,a,s);
if ( master )
{
Vector3 dirto = level.Vec3Diff(invoker.nextpos,master.Vec3Offset(0,0,master.height/2));
Vector3 dirto = level.Vec3Diff(nextpos,master.Vec3Offset(0,0,master.height/2));
double dist = dirto.length();
if ( dist > 10 )
{
@ -1430,7 +1430,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
let t = bt.Thing;
double dist;
if ( !t || !t.bSHOOTABLE || (!t.bISMONSTER && !(t is 'BossBrain') && !t.player) || (t.Health <= 0) || (target && t.IsFriend(target)) || ((dist=Distance3DSquared(t)) > 2250000) || !CheckSight(t,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) continue;
Vector3 dirto = level.Vec3Diff(invoker.nextpos,t.Vec3Offset(0,0,t.height/2));
Vector3 dirto = level.Vec3Diff(nextpos,t.Vec3Offset(0,0,t.height/2));
if ( dir dot dirto < .2 ) continue;
if ( dist > closest ) continue;
closest = dist;
@ -1438,7 +1438,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
}
if ( tracer )
{
Vector3 dirto = level.Vec3Diff(invoker.nextpos,tracer.Vec3Offset(0,0,tracer.height/2));
Vector3 dirto = level.Vec3Diff(nextpos,tracer.Vec3Offset(0,0,tracer.height/2));
double dist = dirto.length();
if ( dist > 10 )
{
@ -1447,11 +1447,11 @@ Class BiosparkArc : SWWMNonInteractiveActor
}
}
}
invoker.nextdir = dir;
nextdir = dir;
}
action void A_Spread( Sound arcsnd = "", double attn = 1., int extra = 0 )
void A_Spread( Sound arcsnd = "", double attn = 1., int extra = 0 )
{
Vector3 tdir = level.Vec3Diff(pos,invoker.nextpos);
Vector3 tdir = level.Vec3Diff(pos,nextpos);
if ( (extra > 1) && !Random[Sparkster](0,3) )
{
Vector3 x, y, z;
@ -1469,9 +1469,9 @@ Class BiosparkArc : SWWMNonInteractiveActor
}
}
if ( (special1 > ReactionTime) || bAMBUSH ) return;
let b = Spawn(GetClass(),invoker.nextpos);
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
b.pitch = asin(-invoker.nextdir.z);
let b = Spawn(GetClass(),nextpos);
b.angle = atan2(nextdir.y,nextdir.x);
b.pitch = asin(-nextdir.z);
b.target = target;
b.master = master;
b.tracer = tracer;
@ -1777,23 +1777,24 @@ Class BiosparkCore : Actor
s.ReactionTime += Random[Sparkster](0,int(5*factor));
}
}
void A_CoreTick()
{
A_CountDown();
angle += anglevel;
pitch += pitchvel;
roll += rollvel;
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.1,.4);
let s = Spawn("SWWMHalfSmoke",pos);
s.vel = pvel+vel*.1;
s.SetShade(Color(4,5,2)*Random[ExploS](40,50));
s.A_SetRenderStyle(s.alpha*.4,STYLE_AddShaded);
s.scale *= 2.;
s.bAMBUSH = true;
}
States
{
Spawn:
XZW1 A 1
{
A_CountDown();
angle += invoker.anglevel;
pitch += invoker.pitchvel;
roll += invoker.rollvel;
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.1,.4);
let s = Spawn("SWWMHalfSmoke",pos);
s.vel = pvel+vel*.1;
s.SetShade(Color(4,5,2)*Random[ExploS](40,50));
s.A_SetRenderStyle(s.alpha*.4,STYLE_AddShaded);
s.scale *= 2.;
s.bAMBUSH = true;
}
XZW1 A 1 A_CoreTick();
Wait;
Bounce:
XZW1 A 0 A_HandleBounce();

View file

@ -93,7 +93,7 @@ Class CandyBeam : SWWMNonInteractiveActor
{
Vector3 nextpos, nextdir;
action void A_Trace()
void A_Trace()
{
let t = new("CandyBeamTracer");
t.hitlist.Clear();
@ -136,12 +136,12 @@ Class CandyBeam : SWWMNonInteractiveActor
else normal *= 0;
if ( t.Results.HitType != TRACE_HitNone ) speed = t.Results.Distance; // shortens in minimap
double a = FRandom[Candy](0,360), s = FRandom[Candy](0.,.8);
invoker.nextpos = level.Vec3Offset(t.Results.HitPos,normal);
invoker.nextdir = SWWMUtility.ConeSpread(dir,y,z,a,s);
nextpos = level.Vec3Offset(t.Results.HitPos,normal);
nextdir = SWWMUtility.ConeSpread(dir,y,z,a,s);
}
action void A_Spread( Class<Actor> pop = "CandyPop", Class<Actor> smk = "SWWMHalfSmoke" )
void A_Spread( Class<Actor> pop = "CandyPop", Class<Actor> smk = "SWWMHalfSmoke" )
{
Vector3 tdir = level.Vec3Diff(pos,invoker.nextpos);
Vector3 tdir = level.Vec3Diff(pos,nextpos);
Vector3 pvel = .1*tdir+SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](.1,.3);
if ( special2 && !Random[ExploS](0,special2) )
{
@ -154,13 +154,13 @@ Class CandyBeam : SWWMNonInteractiveActor
}
if ( special1 > ReactionTime )
{
let s = Spawn(pop,invoker.nextpos);
let s = Spawn(pop,nextpos);
s.target = target;
return;
}
let b = Spawn(GetClass(),invoker.nextpos);
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
b.pitch = asin(-invoker.nextdir.z);
let b = Spawn(GetClass(),nextpos);
b.angle = atan2(nextdir.y,nextdir.x);
b.pitch = asin(-nextdir.z);
b.target = target;
b.special1 = special1+1;
b.special2 = special2;