Renamed some sprites for compatibility with Smooth Doom.

Added water step/land sounds.
Made footsteps toggleable (in case the player is using another mod that adds them).
Added handling of liquid terrain on all actors that need it.
Fixed dual enforcers breaking after level transition.
Fixed some refire issues caused by the use of the Resurrect cheat.
Made guided redeemer missiles explode on player death.
Replaced pure particles on pulse gun effects with actor particles.
This commit is contained in:
Marisa the Magician 2018-06-01 17:49:49 +02:00
commit 71b194c6c3
52 changed files with 182 additions and 41 deletions

View file

@ -36,6 +36,54 @@ Class PulseAmmo : Ammo
}
}
Class PulseSpark : Actor
{
Default
{
RenderStyle "Add";
Radius 2;
Height 2;
+NOBLOCKMAP;
+NOGRAVITY;
+MISSILE;
+FORCEXYBILLBOARD;
+THRUACTORS;
+ROLLSPRITE;
+ROLLCENTER;
+NOTELEPORT;
+DONTSPLASH;
+CANBOUNCEWATER;
-BOUNCEAUTOOFF;
BounceType "Doom";
BounceFactor 1.0;
WallBounceFactor 1.0;
Scale 0.03;
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
if ( !bAMBUSH )
{
roll = FRandom[Pulse](0,360);
let s = Spawn(GetClass(),pos);
s.bAMBUSH = true;
s.vel = vel;
s.scale = scale;
s.roll = roll;
}
}
States
{
Spawn:
PSPK A 1 Bright
{
A_FadeOut(FRandom[Pulse](0.0,0.15));
vel *= 0.96;
}
Wait;
}
}
Class PulseBallLight : DynamicLight
{
double pulseofs;
@ -96,6 +144,8 @@ Class PulseBall : Actor
RenderStyle "Add";
DamageFunction Random[Pulse](15,25);
PROJECTILE;
+EXPLODEONWATER;
+SKYEXPLODE;
Scale 0.2;
Speed 30;
Radius 2;
@ -117,8 +167,8 @@ Class PulseBall : Actor
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Pulse](-1,1),FRandom[Pulse](-1,1),FRandom[Pulse](-1,1)).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](20,40),FRandom[Pulse](2.4,4.8),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](30,50),FRandom[Pulse](4.8,7.2),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",pos);
s.vel = pvel;
}
}
action void A_Trail()
@ -128,8 +178,8 @@ Class PulseBall : Actor
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Pulse](-1,1),FRandom[Pulse](-1,1),FRandom[Pulse](-1,1)).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](10,20),FRandom[Pulse](1.2,2.4),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](15,25),FRandom[Pulse](2.4,3.6),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",pos);
s.vel = pvel;
}
}
States
@ -282,13 +332,12 @@ Class PulseBolt : Actor
accdamage = 0;
}
}
Vector3 origin = Level.Vec3Diff(pos,t.Results.HitPos);
int numpt = Random[Pulse](10,20)*!Random[Pulse](0,2);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = ((FRandom[Pulse](-.4,.5),FRandom[Pulse](-.4,.4),FRandom[Pulse](-.4,.4))-x).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](20,40),FRandom[Pulse](2.4,4.8),0,origin.x,origin.y,origin.z,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](30,50),FRandom[Pulse](4.8,7.2),0,origin.x,origin.y,origin.z,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",t.Results.HitPos-t.Results.HitVector*4);
s.vel = pvel;
}
if ( weffect && (weffect is 'PulseBoltCap') )
{
@ -312,15 +361,14 @@ Class PulseBolt : Actor
accdamage = 0;
damagedactor = null;
}
Vector3 origin = Level.Vec3Diff(pos,t.Results.HitPos);
if ( position >= 19 )
{
int numpt = Random[Pulse](5,10)*!Random[Pulse](0,5);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (t.Results.HitVector+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](20,40),FRandom[Pulse](2.4,4.8),0,origin.x,origin.y,origin.z,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](30,50),FRandom[Pulse](4.8,7.2),0,origin.x,origin.y,origin.z,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",t.Results.HitPos);
s.vel = pvel;
}
if ( weffect && (weffect is 'PulseBoltHit') )
{
@ -393,10 +441,10 @@ Class StarterBolt : PulseBolt
if ( target.player )
{
[x, y, z] = Matrix4.GetAxes(target.pitch,target.angle,target.roll);
origin = (0,0,target.player.viewz-target.pos.z)+5.0*x+3.0*y-1.0*z;
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+5.0*x+3.0*y-1.0*z;
}
else origin = (0,0,target.missileheight);
SetOrigin(target.Vec3Offset(origin.x,origin.y,origin.z),true);
else origin = target.Vec3Offset(0,0,target.missileheight);
SetOrigin(origin,true);
A_SetAngle(target.angle);
A_SetPitch(target.BulletSlope());
frame++;
@ -439,13 +487,13 @@ Class PulseGun : UTWeapon
A_AlertMonsters();
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.5*y-1.9*z;
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.5*y-1.9*z;
int numpt = Random[Pulse](2,5);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](10,20),FRandom[Pulse](1.2,2.4),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](15,25),FRandom[Pulse](2.4,3.6),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",origin);
s.vel = pvel;
}
}
action void A_PulseRefire( statelabel flash = null )
@ -479,7 +527,7 @@ Class PulseGun : UTWeapon
Vector3 x, y, z;
double a;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+4.0*y-1.5*z;
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.0*y-1.5*z;
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
invoker.sangle += 100;
Actor p = Spawn("PulseBall",origin);
@ -491,8 +539,8 @@ Class PulseGun : UTWeapon
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
A_SpawnParticle("FFFFFF",SPF_FULLBRIGHT,Random[Pulse](10,20),FRandom[Pulse](1.2,2.4),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0,1,-1,-0.1);
A_SpawnParticle("40FF00",SPF_FULLBRIGHT,Random[Pulse](15,25),FRandom[Pulse](2.4,3.6),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0,.5,-1,-0.1);
let s = Spawn("PulseSpark",origin);
s.vel = pvel;
}
}
action void A_StartBeam()
@ -500,8 +548,8 @@ Class PulseGun : UTWeapon
A_PlaySound("pulse/bolt",CHAN_WEAPON,1.0,true);
Vector3 x, y, z, origin;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
origin = (0,0,player.viewz-pos.z)+5.0*x+3.0*y-1.0*z;
invoker.beam = Spawn("StarterBolt",Vec3Offset(origin.x,origin.y,origin.z));
origin = Vec2OffsetZ(0,0,player.viewz)+5.0*x+3.0*y-1.0*z;
invoker.beam = Spawn("StarterBolt",origin);
invoker.beam.angle = angle;
invoker.beam.pitch = BulletSlope();
invoker.beam.target = self;
@ -521,6 +569,11 @@ Class PulseGun : UTWeapon
if ( beam ) beam.Destroy();
Super.DetachFromOwner();
}
override void OnDestroy()
{
Super.OnDestroy();
if ( beam ) beam.Destroy();
}
Default
{
Tag "Pulse Gun";