Bump zscript ver to 4.14.1, plus a whole lot of stuff.
- Try to get rid of all implicit casts from string to name, color or class. - Use FindClass where needed. - Used a map in a case where a dictionary was unneeded. - Use new bounce flags where needed. - Replace Legacy of Rust weapons/ammo.
This commit is contained in:
parent
ceae806b68
commit
80db58b0d0
128 changed files with 3074 additions and 3088 deletions
|
|
@ -10,7 +10,7 @@ Class mkBlood : SWWMNonInteractiveActor
|
|||
void A_Bleed( int str = 1 )
|
||||
{
|
||||
if ( !target ) return;
|
||||
let b = Spawn("mkBloodSpray",pos);
|
||||
let b = Spawn('mkBloodSpray',pos);
|
||||
Vector2 dirto = target.Vec2To(self).unit();
|
||||
b.angle = atan2(dirto.y,dirto.x);
|
||||
b.pitch = FRandom[Blood](-60,30);
|
||||
|
|
@ -45,7 +45,7 @@ Class mkBlood : SWWMNonInteractiveActor
|
|||
level.SpawnParticle(puff);
|
||||
}
|
||||
}
|
||||
let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt("mkBloodSmoke",pos));
|
||||
let s = mkBloodSmoke(SWWMStaticSprite.SpawnAt('mkBloodSmoke',pos));
|
||||
s.scolor = b.fillcolor;
|
||||
s.scale *= .4*str;
|
||||
s.thickness = str-1;
|
||||
|
|
@ -111,7 +111,7 @@ Class mkBloodSpray : SWWMNonInteractiveActor
|
|||
int cnt = sz-Random[Blood](0,4);
|
||||
for ( int i=0; i<cnt; i++ )
|
||||
{
|
||||
let d = Spawn("mkBloodDrop",pos);
|
||||
let d = Spawn('mkBloodDrop',pos);
|
||||
d.SetShade(fillcolor);
|
||||
d.CopyBloodColor(self);
|
||||
ang = baseang+target.angle+FRandom[Blood](-15.,15.)*str;
|
||||
|
|
@ -147,7 +147,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
|
|||
+ROLLCENTER;
|
||||
Scale .35;
|
||||
Mass 1;
|
||||
RenderStyle "Translucent";
|
||||
RenderStyle 'Translucent';
|
||||
}
|
||||
// try to reduce overhead as much as possible with this
|
||||
override void Tick()
|
||||
|
|
@ -184,7 +184,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
|
|||
if ( special1-- ) return;
|
||||
special2 += 10;
|
||||
special1 = Random[Blood](20,30)+special2;
|
||||
let d = Spawn("mkBloodDrop",Vec3Offset(0,0,-2));
|
||||
let d = Spawn('mkBloodDrop',Vec3Offset(0,0,-2));
|
||||
d.master = self;
|
||||
d.SetShade(fillcolor);
|
||||
d.CopyBloodColor(self);
|
||||
|
|
@ -433,7 +433,7 @@ Class mkBloodDrop : SWWMNonInteractiveActor
|
|||
Super.PostBeginPlay();
|
||||
SWWMHandler.QueueBlod(self);
|
||||
int jumps = Random[Blood](0,3);
|
||||
state dest = ResolveState("Spawn");
|
||||
state dest = ResolveState('Spawn');
|
||||
SetState(dest+jumps);
|
||||
}
|
||||
override void OnDestroy()
|
||||
|
|
@ -532,7 +532,7 @@ Class mkFlyingGib : Actor
|
|||
Super.Tick();
|
||||
if ( isFrozen() || (freezetics > 0) ) return;
|
||||
if ( killme ) A_FadeOut(.01);
|
||||
if ( CurState == ResolveState("Death2") )
|
||||
if ( CurState == ResolveState('Death2') )
|
||||
{
|
||||
if ( vel.length() < .1 )
|
||||
bleeding = false;
|
||||
|
|
@ -594,7 +594,7 @@ Class mkFlyingGib : Actor
|
|||
Mass 10;
|
||||
Scale .75;
|
||||
Gravity .5;
|
||||
BounceType "Doom";
|
||||
BounceType 'Doom';
|
||||
BounceFactor .2;
|
||||
+MISSILE;
|
||||
+DROPOFF;
|
||||
|
|
@ -625,7 +625,7 @@ Class mkFlyingGib : Actor
|
|||
}
|
||||
Goto Spawn;
|
||||
Death:
|
||||
XZW1 # 1 A_JumpIf(pos.z<=floorz,"Death2");
|
||||
XZW1 # 1 A_JumpIf(pos.z<=floorz,'Death2');
|
||||
Wait;
|
||||
Death2:
|
||||
XZW1 # -1
|
||||
|
|
@ -636,7 +636,7 @@ Class mkFlyingGib : Actor
|
|||
else roll = Random[Gibs](175,185);
|
||||
A_Stop();
|
||||
// floor drop
|
||||
let b = Spawn("mkBloodDrop",pos);
|
||||
let b = Spawn('mkBloodDrop',pos);
|
||||
b.scale *= 2.0;
|
||||
b.SetShade(shadecol);
|
||||
}
|
||||
|
|
@ -662,7 +662,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
double ang, pt;
|
||||
Vector3 dir;
|
||||
int bloodthrottle = 0, gibthrottle = 0;
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||
if ( hnd )
|
||||
{
|
||||
if ( hnd.oldmaxblood != 0 )
|
||||
|
|
@ -673,7 +673,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
|
||||
let a = mkBloodSmoke(SWWMStaticSprite.SpawnAt("mkBloodSmoke",pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height)));
|
||||
let a = mkBloodSmoke(SWWMStaticSprite.SpawnAt('mkBloodSmoke',pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height)));
|
||||
a.scale = (.5,.5);
|
||||
a.alpha = 1.;
|
||||
ang = FRandom[Gibs](0,360);
|
||||
|
|
@ -706,7 +706,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
for ( int i=0; i<gibsize; i++ )
|
||||
{
|
||||
if ( bloodthrottle && (!i || (i%bloodthrottle)) ) continue;
|
||||
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);
|
||||
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);
|
||||
|
|
@ -757,7 +757,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
}
|
||||
if ( mksplat )
|
||||
{
|
||||
let s = Spawn("mkBloodBlast",pos);
|
||||
let s = Spawn('mkBloodBlast',pos);
|
||||
s.SetShade(shadecol);
|
||||
s.master = gibbed;
|
||||
mksplat = false;
|
||||
|
|
@ -771,7 +771,7 @@ Class mkGibber : SWWMNonInteractiveActor
|
|||
{
|
||||
Radius 32;
|
||||
Height 16;
|
||||
mkGibber.GibType "mkFlyingGib";
|
||||
mkGibber.GibType 'mkFlyingGib';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -802,8 +802,8 @@ Class mkBloodBlast : SWWMNonInteractiveActor
|
|||
}
|
||||
default
|
||||
{
|
||||
RenderStyle "Shaded";
|
||||
StencilColor "Red";
|
||||
RenderStyle 'Shaded';
|
||||
StencilColor "FF 00 00";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -818,21 +818,21 @@ Class GreenBloodReference : Actor
|
|||
{
|
||||
Default
|
||||
{
|
||||
BloodColor "Green";
|
||||
BloodColor "00 FF 00";
|
||||
}
|
||||
}
|
||||
Class BlueBloodReference : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
BloodColor "Blue";
|
||||
BloodColor "00 00 FF";
|
||||
}
|
||||
}
|
||||
Class PurpleBloodReference : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
BloodColor "Purple";
|
||||
BloodColor "80 00 FF";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ Class CorpseFallTracker : Thinker
|
|||
static void TrackBody( Actor b )
|
||||
{
|
||||
if ( !b ) return;
|
||||
let cft = new("CorpseFallTracker");
|
||||
let cft = new('CorpseFallTracker');
|
||||
cft.ChangeStatNum(STAT_USER);
|
||||
cft.mybody = b;
|
||||
cft.lastvelz = b.vel.z;
|
||||
|
|
@ -868,7 +868,7 @@ Class CorpseFallTracker : Thinker
|
|||
// wait until body is dead on floor and at the last state of animation
|
||||
if ( (mybody.Health > 0) || isflying || (mybody.tics != -1) || (mybody.vel.length() > 0) )
|
||||
return;
|
||||
let b = mybody.Spawn("mkBloodPool",mybody.pos);
|
||||
let b = mybody.Spawn('mkBloodPool',mybody.pos);
|
||||
Color shadecol;
|
||||
if ( mybody.bloodcolor ) shadecol = Color(mybody.bloodcolor.r/2,mybody.bloodcolor.g/2,mybody.bloodcolor.b/2);
|
||||
else shadecol = Color(80,0,0);
|
||||
|
|
@ -905,7 +905,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
|||
prevpool.nextpool = nextpool;
|
||||
if ( nextpool ) nextpool.prevpool = prevpool;
|
||||
}
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||
if ( !hnd ) return;
|
||||
hnd.bloodpools = nextpool;
|
||||
}
|
||||
|
|
@ -920,7 +920,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
|||
A_SetScale(sz);
|
||||
A_QueueCorpse();
|
||||
SWWMUtility.SetToSlope(self,FRandom[Blood](0,360));
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||
if ( !hnd ) return;
|
||||
nextpool = hnd.bloodpools;
|
||||
hnd.bloodpools = self;
|
||||
|
|
@ -957,7 +957,7 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
|||
{
|
||||
Radius 1;
|
||||
Height 1;
|
||||
StencilColor "Red";
|
||||
StencilColor "FF 00 00";
|
||||
mkBloodPool.BaseAccel .0006;
|
||||
}
|
||||
States
|
||||
|
|
@ -998,8 +998,8 @@ Class mkBloodStep : SWWMNonInteractiveActor
|
|||
|
||||
Default
|
||||
{
|
||||
RenderStyle "Shaded";
|
||||
StencilColor "Red";
|
||||
RenderStyle 'Shaded';
|
||||
StencilColor "FF 00 00";
|
||||
}
|
||||
|
||||
States
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue