109 lines
1.9 KiB
Text
109 lines
1.9 KiB
Text
// Sheen HMG projectiles and effects
|
|
|
|
Class SheenCasing : SWWMCasing
|
|
{
|
|
Default
|
|
{
|
|
BounceSound "sheen/casing";
|
|
}
|
|
}
|
|
|
|
Class SheenPhantom : Actor
|
|
{
|
|
Default
|
|
{
|
|
+NOBLOCKMAP;
|
|
+NOGRAVITY;
|
|
+DONTSPLASH;
|
|
+NOTELEPORT;
|
|
+NOINTERACTION;
|
|
+INTERPOLATEANGLES;
|
|
Radius .1;
|
|
Height 0.;
|
|
Alpha .5;
|
|
RenderStyle "Add";
|
|
}
|
|
override void Tick()
|
|
{
|
|
if ( isFrozen() ) return;
|
|
A_FadeOut(frame?.02:.05);
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
XZW1 A -1 Bright;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class SheenTrail : Actor
|
|
{
|
|
Default
|
|
{
|
|
Obituary "$O_SHEENHMG";
|
|
DamageType "Fire";
|
|
+NOBLOCKMAP;
|
|
+NOGRAVITY;
|
|
+DONTSPLASH;
|
|
+NOTELEPORT;
|
|
+NOINTERACTION;
|
|
+INTERPOLATEANGLES;
|
|
+FORCERADIUSDMG;
|
|
+NODAMAGETHRUST;
|
|
Speed 200;
|
|
Radius .1;
|
|
Height 0.;
|
|
RenderStyle "Add";
|
|
}
|
|
|
|
override void Tick()
|
|
{
|
|
Vector3 oldpos = pos;
|
|
if ( isFrozen() ) return;
|
|
if ( CurState == SpawnState )
|
|
{
|
|
Vector3 dir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(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 = frame;
|
|
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(4*special1+i/50,10)+int(specialf2/10),2000,50,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;
|
|
}
|
|
}
|