swwmgz_m/zscript/dlc/swwm_heavymahsheengun_fx.zsc
Marisa the Magician 80db58b0d0 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.
2025-03-13 14:50:58 +01:00

105 lines
1.9 KiB
Text

// Sheen HMG projectiles and effects
Class SheenCasing : SWWMCasing
{
Default
{
BounceSound "sheen/casing";
}
}
Class SheenPhantom : SWWMNonInteractiveActor
{
Default
{
+INTERPOLATEANGLES;
Alpha .5;
RenderStyle 'Add';
}
override void Tick()
{
if ( freezetics > 0 )
{
freezetics--;
return;
}
if ( isFrozen() ) return;
A_FadeOut(frame?.02:.05);
}
States
{
Spawn:
XZW1 A -1 Bright;
Stop;
}
}
Class SheenTrail : SWWMNonInteractiveActor
{
Default
{
Obituary "$O_SHEENHMG";
DamageType 'Fire';
+INTERPOLATEANGLES;
+FORCERADIUSDMG;
+NODAMAGETHRUST;
Speed 200;
RenderStyle 'Add';
}
override void Tick()
{
Vector3 oldpos = pos;
if ( freezetics > 0 )
{
freezetics--;
return;
}
if ( isFrozen() ) return;
if ( CurState == SpawnState )
{
Vector3 dir = SWWMUtility.Vec3FromAngles(angle,pitch);
Vector3 newpos = level.Vec3Offset(oldpos,dir*min(speed,specialf1));
special1++;
for ( int i=0; i<4; i++ )
{
let p = Spawn('SheenPhantom',level.Vec3Offset(oldpos,dir*(i+1)*50.));
p.angle = angle;
p.pitch = pitch;
p.frame = special2;
p.alpha *= clamp((special1+i*.25)/2.,.25,1.);
}
// burn the air throughout
Vector3 tdir = level.Vec3Diff(oldpos,newpos);
double dist = tdir.length();
tdir /= dist;
for ( int i=0; i<dist; i+=50 )
{
SetOrigin(level.Vec3Offset(oldpos,tdir*i),true);
SWWMUtility.DoExplosion(self,min(3*special1,10)+int(specialf2/10),2000,50,0,DE_NONEXPLOSIVE|DE_NOSPLASH,ignoreme:target);
}
prev = oldpos; // interpolation
SetOrigin(newpos,true);
specialf1 -= speed;
if ( specialf1 <= 0 ) SetStateLabel('Death');
return;
}
if ( !CheckNoDelay() || (tics == -1) ) return;
if ( tics > 0 ) tics--;
while ( !tics )
{
if ( !SetState(CurState.NextState) )
return;
}
}
States
{
Spawn:
XZW1 A -1 Bright;
Stop;
Death:
TNT1 A 5;
Stop;
}
}