Use new let syntax for multiple returns.
This commit is contained in:
parent
c636e0e787
commit
525b9e33eb
46 changed files with 143 additions and 244 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r732 \cu(Sat 14 Jan 18:30:22 CET 2023)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r732 \cu(2023-01-14 18:30:22)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r733 \cu(Sat 14 Jan 19:14:39 CET 2023)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r733 \cu(2023-01-14 19:14:39)\c-";
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
|
||||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,4,8,-12);
|
||||
let c = Spawn("SheenCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -144,8 +143,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
invoker.Ammo1.Amount--;
|
||||
invoker.fired = gametic;
|
||||
// dakka dakka dakka
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
double a = FRandom[Sheen](0,360), s = FRandom[Sheen](.002,.02)*spreadfct;
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
if ( !invoker.st ) invoker.st = new("PiercingTracer");
|
||||
|
|
|
|||
|
|
@ -349,8 +349,7 @@ Class MisterRifle : SWWMWeapon
|
|||
A_ChangeModel("",1,"","",10,"models","",CMDL_USESURFACESKIN,-1);
|
||||
if ( !invoker.waschambered ) return;
|
||||
// brass it up (though it's not made of brass)
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,2,3,-18);
|
||||
let c = Spawn("MisterCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -394,8 +393,7 @@ Class MisterRifle : SWWMWeapon
|
|||
A_ChangeModel("",1,"","",7,"models","",CMDL_USESURFACESKIN,-1);
|
||||
if ( swwm_nomagdrop ) return;
|
||||
// drop it
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,6,3,-18);
|
||||
let c = Spawn("MisterMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -481,8 +479,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.vel += vel*.5+x*FRandom[Mister](1.,4.);
|
||||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
double a, s;
|
||||
Vector3 dir;
|
||||
for ( int i=0; i<8; i++ )
|
||||
|
|
@ -612,8 +609,7 @@ Class MisterRifle : SWWMWeapon
|
|||
s.vel += vel*.5+x*FRandom[Mister](1.,2.);
|
||||
s.SetShade(Color(0,3,4)*Random[ExploS](48,63));
|
||||
}
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
static const double spd[] = {.00,.01,.03,.06,.10};
|
||||
double a = FRandom[Mister](0,360), s = FRandom[Mister](spd[index],spd[index+1]);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
|
|
@ -1097,8 +1093,7 @@ Class MisterRifle : SWWMWeapon
|
|||
A_ChangeModel("",1,"","",9,"models","",CMDL_USESURFACESKIN,-1);
|
||||
if ( !invoker.wasgchambered ) return;
|
||||
// droppage
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,8,3,-18);
|
||||
let c = Spawn("MisterGCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -197,8 +197,7 @@ Class MisterFuzzy : SWWMNonInteractiveActor
|
|||
return;
|
||||
}
|
||||
if ( isFrozen() ) return;
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,(special2<0)?4:44,3000,80,80,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,(special2<0)?4:44,3000,80,80,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
special1--;
|
||||
if ( special1 <= 0 )
|
||||
|
|
@ -326,8 +325,7 @@ Class MisterPop : SWWMNonInteractiveActor
|
|||
}
|
||||
BLPF C 2 Bright
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,4,2000,50,50,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,4,2000,50,50,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
}
|
||||
TNT1 A 1
|
||||
|
|
@ -607,8 +605,7 @@ Class MisterRailEntryImpact : MisterBulletImpact
|
|||
override void A_BulletExplode()
|
||||
{
|
||||
A_AlertMonsters(swwm_uncapalert?0:2000,AMF_EMITFROMTARGET);
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,444,200000,100,100,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,444,200000,100,100,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
A_QuakeEx(6.,6.,6.,10,0,400,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:150,rollintensity:.8);
|
||||
A_StartSound("mister/hitover",CHAN_VOICE,attenuation:.35);
|
||||
|
|
@ -661,8 +658,7 @@ Class MisterRailEntryImpact : MisterBulletImpact
|
|||
{
|
||||
if ( special1 && (special1 <= 10) )
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,44,3000+special1*50,80+special1*4,80+special1*4,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,44,3000+special1*50,80+special1*4,80+special1*4,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
int numpt = Random[ExploS](0,special1/2);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -700,8 +696,7 @@ Class MisterRailExitImpact : MisterBulletImpact
|
|||
override void A_BulletExplode()
|
||||
{
|
||||
A_AlertMonsters(swwm_uncapalert?0:4000,AMF_EMITFROMTARGET);
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,444,80000,200,200,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,444,80000,200,200,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
A_QuakeEx(8.,8.,8.,15,0,600,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:250,rollintensity:1.2);
|
||||
A_StartSound("mister/hitover",CHAN_WEAPON,attenuation:.2);
|
||||
|
|
@ -753,8 +748,7 @@ Class MisterRailExitImpact : MisterBulletImpact
|
|||
{
|
||||
if ( special1 && (special1 <= 20) )
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,44,6000+special1*100,150+special1*5,150+special1*5,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,44,6000+special1*100,150+special1*5,150+special1*5,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
int numpt = Random[ExploS](0,special1/2);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -807,8 +801,7 @@ Class MisterRailHit : SWWMNonInteractiveActor
|
|||
}
|
||||
virtual void Explode( bool thruwall = false )
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,44,120000,100,100,DE_EXTRAZTHRUST|DE_COUNTENEMIES,ignoreme:target);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,44,120000,100,100,DE_EXTRAZTHRUST|DE_COUNTENEMIES,ignoreme:target);
|
||||
if ( mrc ) mrc.nkill += nkill;
|
||||
}
|
||||
States
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ Class Quadravol : SWWMWeapon
|
|||
int idx = clamp(invoker.chargelevel-1,0,4);
|
||||
A_StartSound("quadshot/fire"..BaseNum[idx],CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
double offy = invoker.onehand?3.5:3;
|
||||
double offz = invoker.onehand?-2:-2.5;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,offy,offz);
|
||||
|
|
@ -77,8 +76,7 @@ Class Quadravol : SWWMWeapon
|
|||
}
|
||||
if ( bMelee && fool ) SWWMUtility.AchievementProgressInc("roast",1,player);
|
||||
if ( bMelee || fool || (idx>=4) ) A_StartSound("quadshot/pointblank",CHAN_WEAPON,CHANF_OVERLAP,.6+idx*.1,.4-idx*.05,1.2-idx*.05);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
double a, s;
|
||||
Actor p;
|
||||
bool bExtra = ((idx>=4)&&invoker.chambered&&!invoker.charged);
|
||||
|
|
@ -300,8 +298,7 @@ Class Quadravol : SWWMWeapon
|
|||
|
||||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,-8,8,-16);
|
||||
if ( invoker.wascharged )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -227,8 +227,7 @@ Class QuadProj : Actor
|
|||
void A_QuadMove()
|
||||
{
|
||||
A_QuadTrail();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
double a = FRandom[Quadravol](0.,360.), s = FRandom[Quadravol](0.,drift);
|
||||
vel += x*(accelrate/GameTicRate);
|
||||
vel += SWWMUtility.CircleOffset(y,z,a,s);
|
||||
|
|
|
|||
|
|
@ -49,9 +49,7 @@ extend Class SWWMHandler
|
|||
Console.Printf("\cyStay out of trouble.\c-");
|
||||
S_StartSound("menu/buyinv",CHAN_ITEM,CHANF_UI);
|
||||
}
|
||||
Vector3 safepos;
|
||||
double safeangle;
|
||||
[safepos, safeangle] = level.PickPlayerStart(e.Args[0]);
|
||||
let [safepos, safeangle] = level.PickPlayerStart(e.Args[0]);
|
||||
players[e.Args[0]].mo.Teleport(safepos,safeangle,0);
|
||||
}
|
||||
else if ( e.Name ~== "swwmweaponcheat" )
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ extend Class SWWMHandler
|
|||
}
|
||||
let mo = players[consoleplayer].mo;
|
||||
if ( !ctr ) ctr = new("SWWMCrosshairTracer");
|
||||
Vector3 x, y, z, ofs, origin;
|
||||
Vector3 ofs, origin;
|
||||
Color col;
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
int chp = crosshairhealth;
|
||||
for ( int i=0; i<numcrosshairs; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,12 +29,10 @@ extend Class SWWMHandler
|
|||
if ( (e.Thing.GetBloodType(0) != "mkBlood") || e.Thing.bNOBLOOD )
|
||||
return;
|
||||
CorpseFallTracker.TrackBody(e.Thing);
|
||||
bool b;
|
||||
Actor a;
|
||||
// special handling of some monsters
|
||||
if ( e.Thing.GetClass() == "Cyberdemon" )
|
||||
{
|
||||
[b,a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
if ( !b ) return;
|
||||
mkGibber(a).gibbed = e.Thing;
|
||||
mkGibber(a).delay = 40;
|
||||
|
|
@ -44,7 +42,7 @@ extend Class SWWMHandler
|
|||
}
|
||||
else if ( e.Thing.GetClass() == "SpiderMastermind" )
|
||||
{
|
||||
[b,a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
if ( !b ) return;
|
||||
mkGibber(a).gibbed = e.Thing;
|
||||
mkGibber(a).delay = 60;
|
||||
|
|
@ -53,7 +51,7 @@ extend Class SWWMHandler
|
|||
}
|
||||
else if ( gotgibbed )
|
||||
{
|
||||
[b,a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
let [b, a] = e.Thing.A_SpawnItemEx("mkGibber",flags:SXF_USEBLOODCOLOR);
|
||||
if ( !b ) return;
|
||||
mkGibber(a).gibbed = e.Thing;
|
||||
a.A_SetSize(e.Thing.default.radius,e.Thing.default.height);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ extend Class SWWMHandler
|
|||
|
||||
private ui void DrawWorldCircle( RenderEvent e, Vector3 pos, double radius, Color col )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.viewangle,e.viewpitch,e.viewroll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(e.viewangle,e.viewpitch,e.viewroll);
|
||||
Vector3 ndc[64];
|
||||
for ( int i=0; i<64; i++ )
|
||||
{
|
||||
|
|
@ -81,8 +80,7 @@ extend Class SWWMHandler
|
|||
DrawWorldLine(e,(b1.x,b2.y,b1.z),(b1.x,b2.y,b2.z),"White");
|
||||
DrawWorldLine(e,(b2.x,b2.y,b1.z),(b2.x,b2.y,b2.z),"White");
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(a.angle,a.pitch,a.roll);
|
||||
DrawWorldLine(e,pos,pos+x*16,"Red");
|
||||
DrawWorldLine(e,pos,pos+y*16,"Green");
|
||||
DrawWorldLine(e,pos,pos+z*16,"Blue");
|
||||
|
|
|
|||
|
|
@ -25,10 +25,9 @@ extend Class SWWMHandler
|
|||
{
|
||||
e.Thing.speed *= 2;
|
||||
e.Thing.vel *= 2;
|
||||
Vector3 x, y, z;
|
||||
double ang = e.Thing.target.target?e.Thing.AngleTo(e.Thing.target.target):e.Thing.angle;
|
||||
double pt = e.Thing.target.target?e.Thing.PitchTo(e.Thing.target.target,e.Thing.target.missileheight,e.Thing.target.target.Height/2.):e.Thing.pitch;
|
||||
[x, y, z] = SWWMUtility.GetAxes(ang,pt,e.Thing.roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(ang,pt,e.Thing.roll);
|
||||
int numpt = Random[ExtraMissiles](1,2);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -145,8 +145,7 @@ extend Class SWWMHandler
|
|||
Vector3 worlddir = vel/spd;
|
||||
PPShader.SetUniform1f("ZoomBlur","Fade",clamp((spd-20.)/60.,0.,1.));
|
||||
double str = min(spd/40.,15.);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(e.ViewAngle,e.ViewPitch,e.ViewRoll);
|
||||
Vector3 reldir = (worlddir dot y, worlddir dot z, worlddir dot x);
|
||||
Vector2 centerspot = (.5+reldir.x*.5,.5+reldir.y*.5);
|
||||
if ( reldir.z < 0 )
|
||||
|
|
|
|||
|
|
@ -339,9 +339,7 @@ extend Class SWWMHandler
|
|||
let a = SWWMTeleportLine(Actor.Spawn("SWWMTeleportLine"));
|
||||
a.tline = l;
|
||||
}
|
||||
bool isexit;
|
||||
int exittype;
|
||||
[isexit, exittype] = SWWMUtility.IsExitLine(l);
|
||||
let [isexit, exittype] = SWWMUtility.IsExitLine(l);
|
||||
if ( !isexit ) continue;
|
||||
if ( skipme.Find(l) < skipme.Size() ) continue;
|
||||
skipme.Push(l);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ extend Class SWWMStatusBar
|
|||
override void ReceivedWeapon( Weapon weapn )
|
||||
{
|
||||
Super.ReceivedWeapon(weapn);
|
||||
int dummy, slot;
|
||||
[dummy, slot] = players[consoleplayer].weapons.LocateWeapon(weapn.GetClass());
|
||||
let [dummy, slot] = players[consoleplayer].weapons.LocateWeapon(weapn.GetClass());
|
||||
EventHandler.SendNetworkEvent("swwmweaponreceive",slot,consoleplayer);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -588,8 +588,7 @@ Class SaltBeam : SWWMNonInteractiveActor
|
|||
void SpreadOut()
|
||||
{
|
||||
special1 = 1;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let t = new("SaltTracer");
|
||||
t.Trace(pos,cursector,x,speed,TRACE_HitSky,ignore:target);
|
||||
foreach ( l:t.ShootThroughList )
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
void A_Trace()
|
||||
{
|
||||
tics = bMISSILEMORE?2:1;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
if ( !bSTANDSTILL )
|
||||
{
|
||||
let t = new("TendrilTracer");
|
||||
|
|
@ -93,8 +92,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
if ( bMISSILEMORE && bMISSILEEVENMORE )
|
||||
{
|
||||
// spread into sub-tendrils
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
int ntendies = tracer?clamp(tracer.GetSpawnHealth()/400,2,10):2;
|
||||
for ( int i=0; i<ntendies; i++ )
|
||||
{
|
||||
|
|
@ -115,8 +113,7 @@ Class MykradvoTendril : SWWMNonInteractiveActor
|
|||
if ( !bSTANDSTILL )
|
||||
{
|
||||
int numpt = bMISSILEMORE?9:3;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
double a = FRandom[ExploS](0,360), s = FRandom[ExploS](0,1.);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ Class DemolitionistMenuList ui
|
|||
void Drawer( Vector2 offset )
|
||||
{
|
||||
Vector2 pos, rpos, rsiz;
|
||||
int cx, cy, cw, ch;
|
||||
[cx, cy, cw, ch] = Screen.GetClipRect();
|
||||
let [cx, cy, cw, ch] = Screen.GetClipRect();
|
||||
for ( int i=0; i<items.Size(); i++ )
|
||||
{
|
||||
pos = (items[i].xpos,items[i].ypos)+offset;
|
||||
|
|
|
|||
|
|
@ -30,11 +30,9 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
{
|
||||
if ( a is 'Weapon' )
|
||||
{
|
||||
bool dummy;
|
||||
int slota, slotb;
|
||||
[dummy, slota] = players[consoleplayer].weapons.LocateWeapon(Weapon(a).GetClass());
|
||||
let [dummya, slota] = players[consoleplayer].weapons.LocateWeapon(Weapon(a).GetClass());
|
||||
if ( slota == 0 ) slota = 10;
|
||||
[dummy, slotb] = players[consoleplayer].weapons.LocateWeapon(Weapon(b).GetClass());
|
||||
let [dummyb, slotb] = players[consoleplayer].weapons.LocateWeapon(Weapon(b).GetClass());
|
||||
if ( slotb == 0 ) slotb = 10;
|
||||
if ( slota == slotb )
|
||||
return (Weapon(a).SlotPriority <= Weapon(b).SlotPriority);
|
||||
|
|
@ -67,11 +65,9 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
}
|
||||
if ( usesa && usesb )
|
||||
{
|
||||
bool dummy;
|
||||
int slota, slotb;
|
||||
[dummy, slota] = players[consoleplayer].weapons.LocateWeapon(usesa);
|
||||
let [dummya, slota] = players[consoleplayer].weapons.LocateWeapon(usesa);
|
||||
if ( slota == 0 ) slota = 10;
|
||||
[dummy, slotb] = players[consoleplayer].weapons.LocateWeapon(usesb);
|
||||
let [dummyb, slotb] = players[consoleplayer].weapons.LocateWeapon(usesb);
|
||||
if ( slotb == 0 ) slotb = 10;
|
||||
if ( slota == slotb )
|
||||
{
|
||||
|
|
@ -119,11 +115,9 @@ Class DemolitionistInventoryTab : DemolitionistMenuTab
|
|||
}
|
||||
if ( usesa && usesb )
|
||||
{
|
||||
bool dummy;
|
||||
int slota, slotb;
|
||||
[dummy, slota] = players[consoleplayer].weapons.LocateWeapon(usesa);
|
||||
let [dummya, slota] = players[consoleplayer].weapons.LocateWeapon(usesa);
|
||||
if ( slota == 0 ) slota = 10;
|
||||
[dummy, slotb] = players[consoleplayer].weapons.LocateWeapon(usesb);
|
||||
let [dummyb, slotb] = players[consoleplayer].weapons.LocateWeapon(usesb);
|
||||
if ( slotb == 0 ) slotb = 10;
|
||||
if ( slota == slotb )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -532,8 +532,7 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
|
|||
// formatted name
|
||||
private void UpdateLabel()
|
||||
{
|
||||
int price, amt;
|
||||
[price, amt] = GetPriceUnits();
|
||||
let [price, amt] = GetPriceUnits();
|
||||
let def = GetDefaultByType(inv);
|
||||
if ( bSell )
|
||||
{
|
||||
|
|
@ -564,8 +563,7 @@ Class DemolitionistMenuStoreItem : DemolitionistMenuListItem
|
|||
|
||||
void BuySellItem()
|
||||
{
|
||||
int price, amt;
|
||||
[price, amt] = GetPriceUnits();
|
||||
let [price, amt] = GetPriceUnits();
|
||||
if ( bSell )
|
||||
{
|
||||
EventHandler.SendNetworkEvent(String.Format("swwmstoretake.%s",inv.GetClassName()),consoleplayer,price,amt);
|
||||
|
|
|
|||
|
|
@ -392,9 +392,7 @@ Class SWWMScrollMenu : SWWMCleanMenu
|
|||
{
|
||||
let ti = ListMenuItemTextItem(itm);
|
||||
let rep = new("ListMenuItemSWWMTextItemM");
|
||||
Name c;
|
||||
int p;
|
||||
[c, p] = ti.GetAction();
|
||||
let [c, p] = ti.GetAction();
|
||||
rep.InitDirect(ti.GetX(),ti.GetY(),mDesc.mLineSpacing,ti.mHotkey,ti.mText,ti.mFont,ti.mColor,ti.mColorSelected,c,p);
|
||||
if ( (ti.mText == "$M_EPITNT") || (tntfix && (tntfix < 5)) )
|
||||
rep.mText = tutnt_ep[tntfix++];
|
||||
|
|
@ -405,9 +403,7 @@ Class SWWMScrollMenu : SWWMCleanMenu
|
|||
{
|
||||
let pi = ListMenuItemPatchItem(itm);
|
||||
let rep = new("ListMenuItemSWWMPatchItemM");
|
||||
Name c;
|
||||
int p;
|
||||
[c, p] = pi.GetAction();
|
||||
let [c, p] = pi.GetAction();
|
||||
rep.InitDirect(pi.GetX(),pi.GetY(),mDesc.mLineSpacing,pi.mHotkey,pi.mTexture,c,p);
|
||||
mDesc.mItems[i] = rep;
|
||||
pi.Destroy();
|
||||
|
|
|
|||
|
|
@ -233,9 +233,7 @@ extend Class Demolitionist
|
|||
|
||||
private Weapon PickPNWeapon( bool bPrev = false )
|
||||
{
|
||||
bool found;
|
||||
int sslot, sidx;
|
||||
[found, sslot, sidx] = FindMostRecentWeaponSWWM();
|
||||
let [found, sslot, sidx] = FindMostRecentWeaponSWWM();
|
||||
let cur = player.ReadyWeapon;
|
||||
if ( cur is 'SWWMGesture' ) cur = SWWMGesture(cur).formerweapon;
|
||||
else if ( cur is 'SWWMItemGesture' ) cur = SWWMItemGesture(cur).gest.formerweapon;
|
||||
|
|
|
|||
|
|
@ -99,8 +99,7 @@ extend Class Demolitionist
|
|||
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
|
||||
{
|
||||
double fs = TweakSpeed();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 accel;
|
||||
if ( (player.cmd.upmove == -32768) || sendtoground )
|
||||
{
|
||||
|
|
@ -173,8 +172,7 @@ extend Class Demolitionist
|
|||
if ( player.cmd.buttons&BT_JUMP ) jcmove += 4096.;
|
||||
if ( player.cmd.buttons&BT_CROUCH ) jcmove -= 4096.;
|
||||
if ( CanCrouch() && (player.crouchfactor != -1) ) fs *= player.crouchfactor;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector2 nmove = NormalizedMove();
|
||||
Vector3 accel = x*nmove.x-y*nmove.y+z*jcmove;
|
||||
accel *= fs/320.;
|
||||
|
|
@ -204,8 +202,7 @@ extend Class Demolitionist
|
|||
if ( player.cmd.forwardmove|player.cmd.sidemove )
|
||||
{
|
||||
double bobfactor;
|
||||
double friction, movefactor;
|
||||
[friction, movefactor] = GetFriction();
|
||||
let [friction, movefactor] = GetFriction();
|
||||
bobfactor = (friction<ORIG_FRICTION)?movefactor:ORIG_FRICTION_FACTOR;
|
||||
if ( !player.onground && !bNoGravity )
|
||||
{
|
||||
|
|
@ -298,8 +295,8 @@ extend Class Demolitionist
|
|||
else lastairtic = level.maptime;
|
||||
if ( !(player.cheats & CF_PREDICTING) && !(player.cmd.forwardmove|player.cmd.sidemove) )
|
||||
PlayIdle();
|
||||
Vector3 dodge = (0,0,0), x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
Vector3 dodge = (0,0,0);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
int fm = player.cmd.forwardmove;
|
||||
int sm = player.cmd.sidemove;
|
||||
if ( !(fm|sm) ) fm = 1;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ extend Class Demolitionist
|
|||
FLineTraceData d;
|
||||
LineTrace(angle,DEFMELEERANGE*2,pitch,TRF_THRUACTORS,player.viewheight,data:d);
|
||||
if ( d.HitType == TRACE_HitNone ) return;
|
||||
bool remove;
|
||||
TextureID replacewith;
|
||||
[remove, replacewith] = SWWMUtility.DefaceTexture(d.HitTexture);
|
||||
let [remove, replacewith] = SWWMUtility.DefaceTexture(d.HitTexture);
|
||||
if ( !remove ) return;
|
||||
if ( (d.HitType != TRACE_HitWall) || !d.HitLine.special || !(d.HitLine.activation&SPAC_Use) )
|
||||
player.usedown = true;
|
||||
|
|
@ -160,8 +158,8 @@ extend Class Demolitionist
|
|||
if ( player.usedown )
|
||||
return;
|
||||
if ( !itrace ) itrace = new("SWWMItemTracer");
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 dir;
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetPlayerEye(self);
|
||||
Sector os = level.PointInSector(origin.xy);
|
||||
int rings = 1;
|
||||
|
|
|
|||
|
|
@ -372,9 +372,7 @@ extend Class Demolitionist
|
|||
}
|
||||
}
|
||||
// crush anything we're standing on
|
||||
bool dummy;
|
||||
Actor encroached;
|
||||
[dummy, encroached] = TestMobjZ();
|
||||
let [dummy, encroached] = TestMobjZ();
|
||||
// add special check so corpses don't get stuck on top of monsters and players
|
||||
if ( encroached && encroached.bSOLID && (bSOLID || encroached.bACTLIKEBRIDGE) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -678,10 +678,8 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
|
||||
virtual void BurstGibs()
|
||||
{
|
||||
Actor a;
|
||||
double ang, pt;
|
||||
Vector3 dir;
|
||||
bool dummy;
|
||||
int bloodthrottle = 0, gibthrottle = 0;
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( hnd )
|
||||
|
|
@ -694,7 +692,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
|
||||
a = Spawn("mkBloodSmoke2",pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height));
|
||||
let a = Spawn("mkBloodSmoke2",pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height));
|
||||
ang = FRandom[Gibs](0,360);
|
||||
pt = FRandom[Gibs](-90,90);
|
||||
dir = SWWMUtility.Vec3FromAngles(ang,pt);
|
||||
|
|
@ -707,7 +705,8 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
if ( gibthrottle && (!i || (i%gibthrottle)) ) continue;
|
||||
[dummy, a] = A_SpawnItemEx(gibtype,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](.1,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
|
||||
let [b, a] = A_SpawnItemEx(gibtype,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](.1,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
|
||||
if ( !b ) continue;
|
||||
a.translation = translation;
|
||||
a.CopyBloodColor(self);
|
||||
a.scale *= scale.x;
|
||||
|
|
@ -724,7 +723,8 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
|
||||
[dummy, a] = A_SpawnItemEx("mkBloodDrop",FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
|
||||
let [b, a] = A_SpawnItemEx("mkBloodDrop",FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
|
||||
if ( !b ) continue;
|
||||
ang = FRandom[Gibs](0,360);
|
||||
pt = FRandom[Gibs](-90,90);
|
||||
dir = SWWMUtility.Vec3FromAngles(ang,pt);
|
||||
|
|
|
|||
|
|
@ -276,10 +276,9 @@ Class SWWMGesture : SWWMWeapon
|
|||
{
|
||||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x2, y2, z2;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-3);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("ExplodiumMagProj",origin);
|
||||
p.special1 = 7;
|
||||
|
|
@ -330,9 +329,9 @@ Class SWWMGesture : SWWMWeapon
|
|||
A_StartSound("demolitionist/blowkiss",CHAN_DEMOVOICE,CHANF_OVERLAP,.4);
|
||||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x2, y2, z2, dir;
|
||||
Vector3 dir;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,-1);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let p = Spawn("LoveHeart",origin);
|
||||
p.target = self;
|
||||
p.angle = atan2(x2.y,x2.x);
|
||||
|
|
|
|||
|
|
@ -281,9 +281,7 @@ Class LoveHeart : Actor
|
|||
HitCeiling = false;
|
||||
HitTexture = floorpic;
|
||||
}
|
||||
bool remove;
|
||||
TextureID replacewith;
|
||||
[remove, replacewith] = SWWMUtility.DefaceTexture(HitTexture);
|
||||
let [remove, replacewith] = SWWMUtility.DefaceTexture(HitTexture);
|
||||
if ( !remove ) return;
|
||||
A_StartSound("bestsound",CHAN_ITEMEXTRA,CHANF_OVERLAP);
|
||||
if ( target && target.player )
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ extend Class SWWMUtility
|
|||
d.wtc = perp.multiplyMatrix(view);
|
||||
// screen coord data
|
||||
int sblocks = CVar.FindCVar('screenblocks').GetInt();
|
||||
int viewx, viewy, vieww, viewh;
|
||||
[viewx, viewy, vieww, viewh] = Screen.GetViewWindow();
|
||||
let [viewx, viewy, vieww, viewh] = Screen.GetViewWindow();
|
||||
int sh = Screen.GetHeight();
|
||||
int h = sh;
|
||||
if ( sblocks < 10 ) h = (sblocks*sh/10)&~7;
|
||||
|
|
|
|||
|
|
@ -367,8 +367,8 @@ extend Class SWWMWeapon
|
|||
// multi-hit cone rather than the usual one-hit arc, more fun
|
||||
private action bool TryMelee( double spread, int dmg, String hitsound, double rangemul, double kickmul, int flags, Class<Actor> impactclass )
|
||||
{
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 dir;
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetPlayerEye(self);
|
||||
if ( !invoker.mt ) invoker.mt = new("MeleeTracer");
|
||||
let mt = invoker.mt; // for convenience
|
||||
|
|
|
|||
|
|
@ -67,15 +67,13 @@ Class Hellblazer : SWWMWeapon
|
|||
invoker.clipcount = max(0,invoker.clipcount-1);
|
||||
invoker.magstate[invoker.magpos-invoker.preload] = true;
|
||||
invoker.spinskipped++;
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
SWWMUtility.DoKnockback(self,-x,bAlt?22000.:32000.);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,10,3.5,-5);
|
||||
a = FRandom[Hellblazer](0,360);
|
||||
s = FRandom[Hellblazer](0,bAlt?.02:.005);
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,3.5,-5);
|
||||
double a = FRandom[Hellblazer](0,360);
|
||||
double s = FRandom[Hellblazer](0,bAlt?.02:.005);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn(bAlt?"HellblazerMissile2":"HellblazerMissile",origin);
|
||||
p.target = self;
|
||||
int tidx = max(0,invoker.seekcnt-(invoker.preload+1));
|
||||
|
|
@ -218,8 +216,8 @@ Class Hellblazer : SWWMWeapon
|
|||
if ( invoker.seekcnt > invoker.preload ) return;
|
||||
Vector3 origin = SWWMUtility.GetPlayerEye(self);
|
||||
// try to catch target in cone of vision
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 dir;
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Array<HHitList> hits;
|
||||
hits.Clear();
|
||||
int rings = 1;
|
||||
|
|
|
|||
|
|
@ -178,10 +178,10 @@ Class Wallbuster : SWWMWeapon
|
|||
player.SetPsprite(PSP_WEAPON,ResolveState("DryFire"));
|
||||
return;
|
||||
}
|
||||
Vector3 x, y, z, origin, x2, y2, z2, dir;
|
||||
Vector3 origin, dir;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
int flashstr = 0;
|
||||
int alertness = 0;
|
||||
// second pass, play the fire effects
|
||||
|
|
@ -359,8 +359,7 @@ Class Wallbuster : SWWMWeapon
|
|||
{
|
||||
if ( invoker.fired[invoker.rotation[5]*5+i] )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-3,-13);
|
||||
let c = Spawn("RedShellCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -77,12 +77,12 @@ Class Eviscerator : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
SWWMHandler.DoFlash(self,Color(64,255,224,96),3);
|
||||
A_AlertMonsters(swwm_uncapalert?0:4500);
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
Vector3 dir;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
SWWMUtility.DoKnockback(self,-x,25000.);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,10,4,-5);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,4,-5);
|
||||
int trail = CVar.GetCVar('swwm_funtrails',player).GetInt();
|
||||
if ( trail == 8 ) trail = Random[Eviscerator](1,7);
|
||||
for ( int i=0; i<30; i++ )
|
||||
|
|
@ -152,14 +152,13 @@ Class Eviscerator : SWWMWeapon
|
|||
A_PlayerFire();
|
||||
SWWMHandler.DoFlash(self,Color(16,255,224,96),3);
|
||||
A_AlertMonsters(swwm_uncapalert?0:4000);
|
||||
Vector3 x, y, z, x2, y2, z2, dir, origin;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 dir;
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
SWWMUtility.DoKnockback(self,-x,32000.);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,10,3,-5);
|
||||
a = FRandom[Eviscerator](0,360);
|
||||
s = FRandom[Eviscerator](0,invoker.extended?.003:.02);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,3,-5);
|
||||
double a = FRandom[Eviscerator](0,360);
|
||||
double s = FRandom[Eviscerator](0,invoker.extended?.003:.02);
|
||||
dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("EvisceratorProj",origin);
|
||||
p.target = self;
|
||||
|
|
@ -186,9 +185,8 @@ Class Eviscerator : SWWMWeapon
|
|||
|
||||
action void A_EvisceratorEject()
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,10,-10,-10);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-10,-10);
|
||||
let c = Spawn("EvisceratorCasing",origin);
|
||||
c.angle = angle;
|
||||
c.pitch = pitch;
|
||||
|
|
@ -199,9 +197,8 @@ Class Eviscerator : SWWMWeapon
|
|||
|
||||
action void A_EvisceratorCasingSmoke( Vector3 ofs )
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,ofs.x,ofs.y,ofs.z);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,ofs.x,ofs.y,ofs.z);
|
||||
let s = Spawn("SWWMHalfSmoke",origin);
|
||||
s.scale *= .2;
|
||||
s.alpha *= .4;
|
||||
|
|
|
|||
|
|
@ -429,9 +429,8 @@ Class EvisceratorProj : Actor
|
|||
A_AlertMonsters(swwm_uncapalert?0:3000,AMF_EMITFROMTARGET);
|
||||
if ( !Tracer ) Spawn("EvisceratorProjSmoke",pos);
|
||||
Spawn("EvisceratorProjLight",pos);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
EvisceratorChunk p;
|
||||
Vector3 spawnofs;
|
||||
if ( BlockingMobj ) spawnofs = (0,0,0);
|
||||
|
|
|
|||
|
|
@ -98,9 +98,8 @@ Class Ynykron : SWWMWeapon
|
|||
|
||||
action void A_Backblast()
|
||||
{
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
origin = SWWMUtility.GetFireOffset(self,-15,4,-1);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let origin = SWWMUtility.GetFireOffset(self,-15,4,-1);
|
||||
int numpt = Random[Ynykron](10,20);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,8 +377,7 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
|
|||
{
|
||||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,TRACE_HitSky);
|
||||
foreach ( l:t.ShootThroughList )
|
||||
|
|
@ -451,8 +450,7 @@ Class YnykronLightningArc : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<3; i++ )
|
||||
{
|
||||
let r = Spawn("YnykronLightningArcSub",level.Vec3Offset(pos,tdir*FRandom[Ynykron](0,1)));
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
double a = FRandom[Ynykron](0,360), s = FRandom[Sparkster](0.,1.);
|
||||
Vector3 sdir = SWWMUtility.ConeSpread(x,y,z,a,s);
|
||||
r.angle = atan2(sdir.y,sdir.x);
|
||||
|
|
@ -1179,8 +1177,7 @@ Class YnykronSingularity : SWWMNonInteractiveActor
|
|||
// account for ground friction
|
||||
if ( a.pos.z <= a.floorz )
|
||||
{
|
||||
double frict, movef;
|
||||
[frict, movef] = a.GetFriction();
|
||||
let [frict, movef] = a.GetFriction();
|
||||
grav *= movef;
|
||||
if ( !a.player ) dirto.z += .1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1024,9 +1024,9 @@ Class YnykronShot : SWWMNonInteractiveActor
|
|||
beamcount = 0;
|
||||
blastcount = 0;
|
||||
int rings = 1;
|
||||
Vector3 x, y, z, dir;
|
||||
Vector3 dir;
|
||||
double a, s;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( double i=0; i<.04; i+=.006 )
|
||||
{
|
||||
for ( int j=0; j<360; j+=(360/rings) )
|
||||
|
|
|
|||
|
|
@ -118,8 +118,8 @@ Class DeepImpact : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:300);
|
||||
A_PlayerFire();
|
||||
invoker.clipcount = max(0,invoker.clipcount-3);
|
||||
Vector3 x, y, z, dir;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 dir;
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
SWWMUtility.DoKnockback(self,-x,2000.);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2,-3);
|
||||
DeepTracer t = new("DeepTracer");
|
||||
|
|
@ -262,12 +262,11 @@ Class DeepImpact : SWWMWeapon
|
|||
A_AlertMonsters(swwm_uncapalert?0:8000);
|
||||
A_PlayerFire();
|
||||
invoker.clipcount = 0;
|
||||
Vector3 x, x2, y2, z2;
|
||||
x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 x = SWWMUtility.GetPlayerViewDir(self);
|
||||
SWWMUtility.DoKnockback(self,-x,42000.);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2,-3);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("AirBullet",origin);
|
||||
p.target = self;
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@ Class Spreadgun : SWWMWeapon
|
|||
else amo.Amount = min(amo.Amount+1,amo.MaxAmount);
|
||||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,0,-10);
|
||||
let c = Spawn(invoker.wasgold?"GoldShellCasing":"RedShellCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -232,11 +231,9 @@ Class Spreadgun : SWWMWeapon
|
|||
SWWMHandler.DoFlash(self,Color(40,255,192,64),5);
|
||||
}
|
||||
A_PlayerFire();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,2,-2);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
double a, s;
|
||||
Vector3 dir;
|
||||
if ( invoker.goldload )
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ Class Sparkster : SWWMWeapon
|
|||
else invoker.clipcount = 0;
|
||||
}
|
||||
else invoker.clipcount = max(0,invoker.clipcount-1);
|
||||
Vector3 x, x2, y2, z2, dir;
|
||||
x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 dir;
|
||||
Vector3 x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,4.5,-5);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
double a, s;
|
||||
Actor p;
|
||||
switch ( mode )
|
||||
|
|
@ -114,8 +114,7 @@ Class Sparkster : SWWMWeapon
|
|||
action void A_DropMag( bool stacc = false )
|
||||
{
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-10);
|
||||
let c = Spawn("SparksterMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -1325,8 +1325,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
|
|||
{
|
||||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,TRACE_HitSky);
|
||||
foreach ( l:t.ShootThroughList )
|
||||
|
|
@ -1402,8 +1401,7 @@ Class BiosparkArc : SWWMNonInteractiveActor
|
|||
Vector3 tdir = level.Vec3Diff(pos,nextpos);
|
||||
if ( (extra > 1) && !Random[Sparkster](0,3) )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
for ( int i=0; i<extra; i++ )
|
||||
{
|
||||
let r = Spawn("BiosparkArc",level.Vec3Offset(pos,tdir*FRandom[Sparkster](0,1)));
|
||||
|
|
|
|||
|
|
@ -84,12 +84,11 @@ Class ExplodiumGun : SWWMWeapon
|
|||
SWWMHandler.DoFlash(self,Color(64,255,224,64),3);
|
||||
A_AlertMonsters(swwm_uncapalert?0:5000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, x2, y2, z2;
|
||||
x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 x = SWWMUtility.GetPlayerViewDir(self);
|
||||
SWWMUtility.DoKnockback(self,-x,4000.);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,3,-2);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -155,10 +154,9 @@ Class ExplodiumGun : SWWMWeapon
|
|||
invoker.deadeyecnt = 0;
|
||||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x2, y2, z2;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-3);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("ExplodiumMagProj",origin);
|
||||
p.special1 = invoker.special1;
|
||||
|
|
@ -179,8 +177,7 @@ Class ExplodiumGun : SWWMWeapon
|
|||
{
|
||||
invoker.deadeyecnt = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-10);
|
||||
let c = Spawn("ExplodiumMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -191,8 +188,7 @@ Class ExplodiumGun : SWWMWeapon
|
|||
|
||||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,8,-10);
|
||||
let c = Spawn("ExplodiumCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -627,12 +623,11 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
SWWMHandler.DoFlash(self,Color(64,255,224,64),3);
|
||||
A_AlertMonsters(swwm_uncapalert?0:5000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, x2, y2, z2;
|
||||
x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 x = SWWMUtility.GetPlayerViewDir(self);
|
||||
SWWMUtility.DoKnockback(self,-x,4000.);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,3.5*side,-2);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.002);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -697,8 +692,7 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
{
|
||||
ExplodiumGun(invoker.SisterWeapon).deadeyecnt = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2*side,-10);
|
||||
let c = Spawn("ExplodiumMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -709,8 +703,7 @@ Class DualExplodiumGun : SWWMWeapon
|
|||
|
||||
action void A_DropCasing( int side = 1 )
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,8*side,-10);
|
||||
let c = Spawn("ExplodiumCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
|
|||
|
|
@ -68,8 +68,7 @@ Class ExplodiumMagArm : Actor
|
|||
Spawn("ExplodiumMagTrail",pos);
|
||||
if ( !(ReactionTime%2) )
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,3+reactiontime/2,3000+500*reactiontime,40+3*reactiontime,20,DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,3+reactiontime/2,3000+500*reactiontime,40+3*reactiontime,20,DE_COUNTENEMIES);
|
||||
if ( target && special1 ) SWWMUtility.AchievementProgressInc("grenade",nkill,target.player);
|
||||
}
|
||||
Vector3 pvel = SWWMUtility.Vec3FromAngles(FRandom[ExploS](0,360),FRandom[ExploS](-90,90))*FRandom[ExploS](1,5);
|
||||
|
|
@ -150,8 +149,7 @@ Class ExplodiumMagProj : Actor
|
|||
A_SetRenderStyle(1.,STYLE_Add);
|
||||
Scale *= 2.+.2*special1;
|
||||
A_AlertMonsters(swwm_uncapalert?0:6000,AMF_EMITFROMTARGET);
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,20+25*special1,80000+8000*special1,90+10*special1,60,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,20+25*special1,80000+8000*special1,90+10*special1,60,DE_EXTRAZTHRUST|DE_COUNTENEMIES);
|
||||
if ( target && isplanted ) SWWMUtility.AchievementProgressInc("grenade",nkill,target.player);
|
||||
A_QuakeEx(9.,9.,9.,30,0,400+80*special1,"",QF_RELATIVE|QF_SCALEDOWN|QF_3D,falloff:300,rollintensity:2.);
|
||||
A_StartSound("explodium/maghit",CHAN_VOICE,attenuation:.35);
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ Class CandyGun : SWWMWeapon
|
|||
return true;
|
||||
if ( (item.GetClass() == GetClass()) && !item.ShouldStay() )
|
||||
{
|
||||
bool ammoget, spareget;
|
||||
[ammoget, spareget] = CandyGun(item).PickupForAmmoAndSpares(self);
|
||||
let [ammoget, spareget] = CandyGun(item).PickupForAmmoAndSpares(self);
|
||||
if ( ammoget || spareget )
|
||||
item.bPickupGood = true;
|
||||
if ( !deathmatch && !spareget )
|
||||
|
|
@ -131,12 +130,11 @@ Class CandyGun : SWWMWeapon
|
|||
SWWMHandler.DoFlash(self,Color(64,224,64,255),5);
|
||||
A_AlertMonsters(swwm_uncapalert?0:9000);
|
||||
A_PlayerFire();
|
||||
Vector3 x, x2, y2, z2;
|
||||
x = SWWMUtility.GetPlayerViewDir(self);
|
||||
Vector3 x = SWWMUtility.GetPlayerViewDir(self);
|
||||
SWWMUtility.DoKnockback(self,-x,18000.);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,3,-2);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.005);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION|TRF_NOSKY,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -194,10 +192,9 @@ Class CandyGun : SWWMWeapon
|
|||
{
|
||||
let weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x2, y2, z2;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-3);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.01);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("CandyMagProj",origin);
|
||||
p.special1 = invoker.special1;
|
||||
|
|
@ -219,10 +216,9 @@ Class CandyGun : SWWMWeapon
|
|||
if ( weap.Ammo2.Amount <= 0 ) weap.Amount = 0;
|
||||
weap.Ammo2.Amount = max(0,weap.Ammo2.Amount-1);
|
||||
}
|
||||
Vector3 x2, y2, z2;
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-3);
|
||||
double a = FRandom[Spread](0,360), s = FRandom[Spread](0,.015);
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
Vector3 dir = SWWMUtility.ConeSpread(x2,y2,z2,a,s);
|
||||
let p = Spawn("CandyGunProj",origin);
|
||||
p.special1 = invoker.clipcount+invoker.chambered;
|
||||
|
|
@ -239,8 +235,7 @@ Class CandyGun : SWWMWeapon
|
|||
action void A_DropMag()
|
||||
{
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,-2,-10);
|
||||
let c = Spawn("CandyMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -291,8 +286,7 @@ Class CandyGun : SWWMWeapon
|
|||
|
||||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,8,-10);
|
||||
let c = Spawn("CandyCasing",origin);
|
||||
c.special1 = special1;
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ Class CandyBeam : SWWMNonInteractiveActor
|
|||
{
|
||||
let t = new("CandyBeamTracer");
|
||||
t.hitlist.Clear();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
let [x, y, z] = SWWMUtility.GetAxes(angle,pitch,roll);
|
||||
t.ShootThroughList.Clear();
|
||||
t.Trace(pos,CurSector,x,speed,0);
|
||||
foreach ( l:t.ShootThroughList )
|
||||
|
|
|
|||
|
|
@ -478,13 +478,11 @@ Class SilverBullet : SWWMWeapon
|
|||
A_BumpFOV(.76);
|
||||
A_PlayerFire();
|
||||
SWWMHandler.DoFlash(self,Color(110,255,192,80),8);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin;
|
||||
if ( !invoker.zoomed ) origin = SWWMUtility.GetFireOffset(self,10,1,-1);
|
||||
else origin = SWWMUtility.GetPlayerEye(self);
|
||||
Vector3 x2, y2, z2;
|
||||
[x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
let [x2, y2, z2] = SWWMUtility.GetPlayerAxesAutoAimed(self);
|
||||
SilverBulletTracer sst = new("SilverBulletTracer");
|
||||
sst.penetration = invoker.proneme?1200.:1000.;
|
||||
sst.hitlist.Clear();
|
||||
|
|
@ -537,8 +535,7 @@ Class SilverBullet : SWWMWeapon
|
|||
}
|
||||
action void A_DropCasing()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,10,-8);
|
||||
let c = Spawn("SilverBulletCasing",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -548,8 +545,7 @@ Class SilverBullet : SWWMWeapon
|
|||
}
|
||||
action void A_DropBullet()
|
||||
{
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,10,10,-8);
|
||||
MagAmmo ma = MagAmmo(FindInventory("SilverBullets"));
|
||||
if ( !ma )
|
||||
|
|
@ -598,8 +594,7 @@ Class SilverBullet : SWWMWeapon
|
|||
ma.MagFill();
|
||||
invoker.ClipCount = 0;
|
||||
if ( swwm_nomagdrop ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
Vector3 origin = SWWMUtility.GetFireOffset(self,6,0,-15);
|
||||
let c = Spawn("SilverBulletMag",origin);
|
||||
c.angle = angle;
|
||||
|
|
@ -610,8 +605,7 @@ Class SilverBullet : SWWMWeapon
|
|||
action void A_JetCompensate()
|
||||
{
|
||||
invoker.specialf1 -= .06;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
let [x, y, z] = SWWMUtility.GetPlayerAxes(self);
|
||||
vel += x*min(1.,invoker.specialf1)*(600./Mass);
|
||||
A_OverlayAlpha(PSP_WEAPON+1,clamp(invoker.specialf1*3.,0.,1.));
|
||||
if ( Random[SilverBullet](0,int(invoker.specialf1*2)) )
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ Class SilverAirRip : SWWMNonInteractiveActor
|
|||
}
|
||||
virtual void Explode( bool thruwall = false )
|
||||
{
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,40,2000,40,flags:DE_COUNTENEMIES|DE_NONEXPLOSIVE,ignoreme:target);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,40,2000,40,flags:DE_COUNTENEMIES|DE_NONEXPLOSIVE,ignoreme:target);
|
||||
if ( SilverBullet(master) )
|
||||
{
|
||||
Silverbullet(master).nkills += nkill;
|
||||
|
|
@ -78,8 +77,7 @@ Class SilverImpact : SWWMNonInteractiveActor
|
|||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
int nhit, nkill;
|
||||
[nhit, nkill] = SWWMUtility.DoExplosion(self,100,8000,100,20,DE_COUNTENEMIES|DE_NONEXPLOSIVE);
|
||||
let [nhit, nkill] = SWWMUtility.DoExplosion(self,100,8000,100,20,DE_COUNTENEMIES|DE_NONEXPLOSIVE);
|
||||
if ( SilverBullet(master) )
|
||||
{
|
||||
Silverbullet(master).nkills += nkill;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue