Adjust terrain splash alert radius.

This commit is contained in:
Mari the Deer 2022-09-17 20:47:17 +02:00
commit 502f9fc495
13 changed files with 54 additions and 7 deletions

View file

@ -126,6 +126,7 @@ Class HeavyMahSheenGun : SWWMWeapon
for ( int i=0; i<st.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",st.WaterHitList[i].hitpos);
b.target = self;
b.A_CheckTerrain();
}
for ( int i=5; i<st.Results.Distance; i+=10 )

View file

@ -1228,6 +1228,7 @@ Class SWWMBulletTrail : LineTracer
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Actor.Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=5; i<t.Results.Distance; i+=10 )
@ -1473,6 +1474,7 @@ Class SWWMWaterSplash : SWWMBaseSplash
dir.z += 1.;
A_SpawnParticle(SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)),0,60,str,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMWaterSplash2 : SWWMBaseSplash
@ -1491,6 +1493,7 @@ Class SWWMWaterSplash2 : SWWMBaseSplash
dir.z += .35;
A_SpawnParticle(SWWMUtility.LerpColor("40 60 FF","A0 C0 FF",FRandom[ExploS](0.,1.)),0,50,str,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
}
Class SWWMBloodSplash : SWWMBaseSplash
@ -1509,6 +1512,7 @@ Class SWWMBloodSplash : SWWMBaseSplash
dir.z += 1.;
A_SpawnParticle(SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)),0,60,str+.5,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMBloodSplash2 : SWWMBaseSplash
@ -1527,6 +1531,7 @@ Class SWWMBloodSplash2 : SWWMBaseSplash
dir.z += .35;
A_SpawnParticle(SWWMUtility.LerpColor("80 00 00","60 00 00",FRandom[ExploS](0.,1.)),0,50,str+.5,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.5,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
}
Class SWWMSludgeSplash : SWWMBaseSplash
@ -1545,6 +1550,7 @@ Class SWWMSludgeSplash : SWWMBaseSplash
dir.z += .4;
A_SpawnParticle(SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)),0,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMSludgeSplash2 : SWWMBaseSplash
@ -1563,6 +1569,7 @@ Class SWWMSludgeSplash2 : SWWMBaseSplash
dir.z += .15;
A_SpawnParticle(SWWMUtility.LerpColor("40 50 40","30 30 30",FRandom[ExploS](0.,1.)),0,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
}
Class SWWMMudSplash : SWWMBaseSplash
@ -1581,6 +1588,7 @@ Class SWWMMudSplash : SWWMBaseSplash
dir.z += .4;
A_SpawnParticle(SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)),0,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMMudSplash2 : SWWMBaseSplash
@ -1599,6 +1607,7 @@ Class SWWMMudSplash2 : SWWMBaseSplash
dir.z += .15;
A_SpawnParticle(SWWMUtility.LerpColor("50 40 20","30 20 10",FRandom[ExploS](0.,1.)),0,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
}
Class SWWMSlimeSplash : SWWMBaseSplash
@ -1617,6 +1626,7 @@ Class SWWMSlimeSplash : SWWMBaseSplash
dir.z += .4;
A_SpawnParticle(SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)),SPF_FULLBRIGHT,40,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMSlimeSplash2 : SWWMBaseSplash
@ -1635,6 +1645,7 @@ Class SWWMSlimeSplash2 : SWWMBaseSplash
dir.z += .15;
A_SpawnParticle(SWWMUtility.LerpColor("00 FF 00","00 80 00",FRandom[ExploS](0.,1.)),SPF_FULLBRIGHT,30,str+2.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
A_AlertMonsters(swwm_uncapalert?0:300);
}
}
Class SWWMLavaSplash : SWWMBaseSplash
@ -1653,7 +1664,8 @@ Class SWWMLavaSplash : SWWMBaseSplash
dir.z += .6;
A_SpawnParticle(SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)),SPF_FULLBRIGHT,40,str+1.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
Spawn("SWWMSizzleSmoke",pos);
let s = Spawn("SWWMSizzleSmoke",pos);
s.target = target;
}
}
Class SWWMLavaSplash2 : SWWMBaseSplash
@ -1672,7 +1684,8 @@ Class SWWMLavaSplash2 : SWWMBaseSplash
dir.z += .2;
A_SpawnParticle(SWWMUtility.LerpColor("FF C0 40","FF 40 20",FRandom[ExploS](0.,1.)),SPF_FULLBRIGHT,30,str+1.,0,0,0,0,dir.x,dir.y,dir.z,0,0,-.03*str,.8,-1,-.02*str);
}
Spawn("SWWMSizzleSmoke2",pos);
let s = Spawn("SWWMSizzleSmoke2",pos);
s.target = target;
}
}
Class SWWMSizzleSmoke : SWWMBaseSplash
@ -1694,6 +1707,7 @@ Class SWWMSizzleSmoke : SWWMBaseSplash
s.A_SetRenderStyle(s.alpha*.4,STYLE_AddShaded);
s.special1 = Random[ExploS](0,2);
}
A_AlertMonsters(swwm_uncapalert?0:1200);
}
}
Class SWWMSizzleSmoke2 : SWWMBaseSplash
@ -1712,6 +1726,7 @@ Class SWWMSizzleSmoke2 : SWWMBaseSplash
s.scale *= 20.;
s.A_SetRenderStyle(s.alpha*.3,STYLE_AddShaded);
s.special1 = Random[ExploS](0,1);
A_AlertMonsters(swwm_uncapalert?0:300);
}
}

View file

@ -3194,6 +3194,7 @@ Class Demolitionist : PlayerPawn
if ( !nosplash )
{
let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self;
b.A_CheckTerrain();
}
vel.xy += (RotateVector(NormalizedMove(),angle)/3600.)*TweakSpeed();
@ -3204,6 +3205,7 @@ Class Demolitionist : PlayerPawn
if ( !nosplash )
{
let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self;
b.A_CheckTerrain();
}
vel.xy += (RotateVector(NormalizedMove(),angle)/4800.)*TweakSpeed();
@ -3214,6 +3216,7 @@ Class Demolitionist : PlayerPawn
if ( !nosplash )
{
let b = Spawn("SmolInvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
b.target = self;
b.A_CheckTerrain();
}
vel.xy += (RotateVector(NormalizedMove(),angle)/6400.)*TweakSpeed();

View file

@ -461,7 +461,10 @@ Class DemolitionistRadiusShockwave : Actor
SetZ(floorz);
pitch = min(85,(pitch+2)*1.05);
if ( !Random[ExploS](0,3) )
Spawn("InvisibleSplasher",Vec3Offset(0,0,2));
{
let p = Spawn("InvisibleSplasher",Vec3Offset(0,0,2));
p.target = target;
}
let s = Spawn("DemolitionistRadiusShockwaveTail",pos);
s.vel = vel*.35;
s.scale = scale;

View file

@ -136,7 +136,8 @@ Class SWWMBulletImpact : Actor
}
if ( !Random[Junk](0,3) ) A_StartSound("bullet/ricochet",CHAN_VOICE);
else A_StartSound("bullet/hit",CHAN_VOICE,attenuation:2.);
Spawn("InvisibleSplasher",pos);
let b = Spawn("InvisibleSplasher",pos);
b.target = target;
}
States
{

View file

@ -224,6 +224,7 @@ Class Wallbuster : SWWMWeapon
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn(large?"InvisibleSplasher":"SmolInvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = self;
b.A_CheckTerrain();
}
for ( int i=5; i<t.Results.Distance; i+=10 )

View file

@ -670,6 +670,7 @@ Class YnykronBeam : Actor
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=0; i<t.Results.Distance; i+=32 )
@ -787,6 +788,7 @@ Class YnykronBeam : Actor
for ( int i=0; i<it.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",it.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=0; i<it.Results.Distance; i+=32 )
@ -2723,6 +2725,7 @@ Class YnykronAltBeam : Actor
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=0; i<t.Results.Distance; i+=16 )

View file

@ -178,7 +178,8 @@ Class DeepImpact : SWWMWeapon
if ( t.Results.FFloor ) hitnormal = -t.Results.FFloor.top.Normal;
else hitnormal = t.Results.HitSector.floorplane.Normal;
wnorm += (hitnormal*.2-dir)/max(50.,t.Results.Distance);
Spawn("InvisibleSplasher",t.Results.HitPos);
let b = Spawn("InvisibleSplasher",t.Results.HitPos);
b.target = self;
}
else if ( t.Results.HitType == TRACE_HitCeiling )
{

View file

@ -298,6 +298,7 @@ Class Spreadgun : SWWMWeapon
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn(large?"InvisibleSplasher":"SmolInvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = self;
b.A_CheckTerrain();
}
for ( int i=5; i<t.Results.Distance; i+=10 )

View file

@ -305,6 +305,7 @@ Class SaltBeam : Actor
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Actor.Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=4; i<t.Results.Distance; i+=8 )
@ -806,6 +807,7 @@ Class CorrosiveFlechette : Actor
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn("SmolInvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = target;
b.A_CheckTerrain();
}
for ( int i=10; i<t.Results.Distance; i+=20 )

View file

@ -355,6 +355,7 @@ Class SilverBullet : SWWMWeapon
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = self;
b.A_CheckTerrain();
}
for ( int i=0; i<t.HitList.Size(); i++ )
@ -543,6 +544,7 @@ Class SilverBullet : SWWMWeapon
for ( int i=0; i<t.WaterHitList.Size(); i++ )
{
let b = Spawn("InvisibleSplasher",t.WaterHitList[i].hitpos);
b.target = self;
b.A_CheckTerrain();
}
for ( int i=4; i<t.Results.Distance; i+=8 )