Reattach headpats to revived actors.
Don't use small splashes for footsteps, they'll sound weird in hexen. Add howling to various things.
This commit is contained in:
parent
750277e262
commit
bbf5b73bce
7 changed files with 41 additions and 20 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r616 \cu(Sat 14 Nov 11:01:54 CET 2020)";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r617 \cu(Sat 14 Nov 12:23:48 CET 2020)";
|
||||
|
|
|
|||
|
|
@ -940,6 +940,14 @@ Class SWWMHandler : EventHandler
|
|||
// reattach combat tracker
|
||||
if ( !swwm_notrack && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER) && !(e.Thing is 'LampMoth') && !(e.Thing is 'CompanionLamp') )
|
||||
SWWMCombatTracker.Spawn(e.Thing);
|
||||
// reattach headpats
|
||||
if ( SWWMUtility.IdentifyingDog(e.Thing) || SWWMUtility.IdentifyingCaco(e.Thing)
|
||||
|| SWWMUtility.IdentifyingDrug(e.Thing) || SWWMUtility.IdentifyingDoubleBoi(e.Thing) )
|
||||
{
|
||||
// you can pet the dog, and you can also pet the caco (and friends)
|
||||
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
|
||||
hp.target = e.Thing;
|
||||
}
|
||||
if ( !(e.Thing is 'PlayerPawn') ) return;
|
||||
// reset some vars
|
||||
if ( e.Thing.playernumber() != -1 )
|
||||
|
|
@ -948,13 +956,6 @@ Class SWWMHandler : EventHandler
|
|||
spreecount[e.Thing.playernumber()] = 0;
|
||||
tookdamage[e.Thing.playernumber()] = false;
|
||||
lastkill[e.Thing.playernumber()] = int.min;
|
||||
// initialize some player vars
|
||||
if ( e.Thing is 'Demolitionist' )
|
||||
{
|
||||
Demolitionist(e.Thing).dashfuel = 240.;
|
||||
Demolitionist(e.Thing).last_boost = 0;
|
||||
Demolitionist(e.Thing).last_kick = 0;
|
||||
}
|
||||
}
|
||||
// reset uptime since player had just died
|
||||
SWWMStats s = SWWMStats.Find(e.Thing.player);
|
||||
|
|
|
|||
|
|
@ -134,6 +134,12 @@ Class SWWMHDoomHandler : StaticEventHandler
|
|||
}
|
||||
}
|
||||
|
||||
override void WorldThingRevived( WorldEvent e )
|
||||
{
|
||||
// reattach pats
|
||||
WorldThingSpawned(e);
|
||||
}
|
||||
|
||||
override void UiTick()
|
||||
{
|
||||
if ( !detected ) return;
|
||||
|
|
|
|||
|
|
@ -1862,7 +1862,7 @@ Class Demolitionist : PlayerPawn
|
|||
else
|
||||
{
|
||||
A_StartSound("demolitionist/walk",CHAN_FOOTSTEP,CHANF_OVERLAP,vol*.5);
|
||||
let b = Spawn("SmolInvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
|
||||
let b = Spawn("InvisibleSplasher",level.Vec3Offset(pos,(RotateVector((0,yofs*.25*radius),angle),0)));
|
||||
b.A_CheckTerrain();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ Class DragonBreathArm : Actor
|
|||
l.target = p;
|
||||
}
|
||||
if ( !(ReactionTime%2) )
|
||||
SWWMUtility.DoExplosion(self,1+(reactiontime*1.5),1000+200*reactiontime,150-6*reactiontime,ignoreme:bHITOWNER?null:target);
|
||||
SWWMUtility.DoExplosion(self,1+(reactiontime*1.5),1000+200*reactiontime,150-6*reactiontime,flags:DE_HOWL,ignoreme:bHITOWNER?null:target);
|
||||
double spd = vel.length();
|
||||
vel = (vel*.4+(FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2),FRandom[ExploS](-.2,.2))).unit()*spd;
|
||||
Vector3 pvel = (FRandom[ExploS](-1,1),FRandom[ExploS](-1,1),FRandom[ExploS](-1,1)).unit()*FRandom[ExploS](1,5);
|
||||
|
|
@ -623,6 +623,8 @@ Class SaltBeam : Actor
|
|||
{
|
||||
SWWMUtility.DoKnockback(t.Results.HitActor,x,25000);
|
||||
t.Results.HitActor.DamageMobj(self,target,60+Accuracy*5,'Salt',DMG_THRUSTLESS);
|
||||
if ( t.Results.HitActor && t.Results.HitActor.bIsMonster && !Random[Spreadgun](0,3) )
|
||||
t.Results.HitActor.Howl();
|
||||
}
|
||||
Vector3 norm = -x;
|
||||
if ( t.Results.HitType == TRACE_HitWall )
|
||||
|
|
@ -691,7 +693,7 @@ Class SaltBeam : Actor
|
|||
if ( isFrozen() ) return;
|
||||
A_FadeOut(.04);
|
||||
if ( Random[Spreadgun](-2,args[2]/10) == 0 )
|
||||
SWWMUtility.DoExplosion(self,5+Accuracy,5000,32,ignoreme:target);
|
||||
SWWMUtility.DoExplosion(self,5+Accuracy,5000,32,flags:DE_HOWL,ignoreme:target);
|
||||
if ( ((special2%5) || args[2]) && !special1 ) SpreadOut();
|
||||
args[2]++;
|
||||
if ( !CheckNoDelay() || (tics == -1) ) return;
|
||||
|
|
@ -876,6 +878,8 @@ Class OnFire : Actor
|
|||
int flg = DMG_THRUSTLESS;
|
||||
if ( victim is 'Centaur' ) flg |= DMG_FOILINVUL; // you're on fire, that shield is worthless
|
||||
victim.DamageMobj(self,instigator,clamp(int(amount*.1),1,30),'Fire',flg); // need to use this actor as inflictor to have a proper obituary
|
||||
if ( victim.bISMONSTER && !Random[FlameT](0,3) )
|
||||
victim.Howl();
|
||||
}
|
||||
if ( !victim )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -258,6 +258,8 @@ Class BigBiospark : Actor
|
|||
if ( SWWMUtility.SphereIntersect(t,pos,40) )
|
||||
{
|
||||
t.DamageMobj(self,target,4+special1,'Electric');
|
||||
if ( t.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.Howl();
|
||||
Health--;
|
||||
}
|
||||
if ( SWWMUtility.SphereIntersect(t,pos,120) )
|
||||
|
|
@ -276,7 +278,7 @@ Class BigBiospark : Actor
|
|||
{
|
||||
A_StopSound(CHAN_VOICE);
|
||||
A_AlertMonsters(15000);
|
||||
SWWMUtility.DoExplosion(self,350,90000,250,100);
|
||||
SWWMUtility.DoExplosion(self,350,90000,250,100,flags:DE_HOWL);
|
||||
A_QuakeEx(9,9,9,30,0,1400,"",QF_RELATIVE|QF_SCALEDOWN,falloff:500,rollIntensity:1.5);
|
||||
A_StartSound("biospark/bighit",CHAN_ITEM,attenuation:.4);
|
||||
A_StartSound("biospark/bighit",CHAN_WEAPON,attenuation:.3);
|
||||
|
|
@ -330,7 +332,7 @@ Class BigBiospark : Actor
|
|||
if ( special1 > 40 ) return;
|
||||
double factor = (40-special1)/40.;
|
||||
double invfct = 1.-factor;
|
||||
SWWMUtility.DoExplosion(self,80*factor,0.,250*invfct);
|
||||
SWWMUtility.DoExplosion(self,80*factor,0.,250*invfct,flags:DE_HOWL);
|
||||
SWWMUtility.DoExplosion(self,0,-8000*factor,500*invfct);
|
||||
int numpt = int(Random[ExploS](16,32)*factor);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -536,7 +538,7 @@ Class BiosparkBall : Actor
|
|||
{
|
||||
A_StopSound(CHAN_VOICE);
|
||||
A_AlertMonsters(5000);
|
||||
SWWMUtility.DoExplosion(self,50,20000,150,80);
|
||||
SWWMUtility.DoExplosion(self,50,20000,150,80,flags:DE_HOWL);
|
||||
A_QuakeEx(6,6,6,16,0,800,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.8);
|
||||
A_StartSound("biospark/hit",CHAN_ITEM,attenuation:.8);
|
||||
A_StartSound("biospark/hit",CHAN_WEAPON,attenuation:.6);
|
||||
|
|
@ -589,7 +591,7 @@ Class BiosparkBall : Actor
|
|||
if ( special1 > 30 ) return;
|
||||
double factor = (30-special1)/30.;
|
||||
double invfct = 1.-factor;
|
||||
SWWMUtility.DoExplosion(self,10*factor,0.,150*invfct);
|
||||
SWWMUtility.DoExplosion(self,10*factor,0.,150*invfct,flags:DE_HOWL);
|
||||
SWWMUtility.DoExplosion(self,0,-5000*factor,300*invfct);
|
||||
int numpt = int(Random[ExploS](16,32)*factor);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -700,7 +702,7 @@ Class BiosparkBeamImpact : Actor
|
|||
{
|
||||
Super.PostBeginPlay();
|
||||
A_AlertMonsters(2000);
|
||||
SWWMUtility.DoExplosion(self,40,20000,100,40);
|
||||
SWWMUtility.DoExplosion(self,40,20000,100,40,flags:DE_HOWL);
|
||||
A_QuakeEx(3,3,3,12,0,800,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:.4);
|
||||
A_StartSound("biospark/beamhit",CHAN_ITEM,attenuation:1.1);
|
||||
A_StartSound("biospark/beamhit",CHAN_WEAPON,attenuation:.8);
|
||||
|
|
@ -753,7 +755,7 @@ Class BiosparkBeamImpact : Actor
|
|||
if ( special1 > 30 ) return;
|
||||
double factor = (30-special1)/30.;
|
||||
double invfct = 1.-factor;
|
||||
SWWMUtility.DoExplosion(self,10*factor,0.,50*invfct);
|
||||
SWWMUtility.DoExplosion(self,10*factor,0.,50*invfct,flags:DE_HOWL);
|
||||
SWWMUtility.DoExplosion(self,0.,-5000*factor,100*invfct);
|
||||
int numpt = int(Random[ExploS](8,16)*factor);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -846,7 +848,7 @@ Class BiosparkComboImpactSub : Actor
|
|||
{
|
||||
Super.PostBeginPlay();
|
||||
if ( !bAMBUSH ) return;
|
||||
SWWMUtility.DoExplosion(self,30,10000,300,120);
|
||||
SWWMUtility.DoExplosion(self,30,10000,300,120,flags:DE_HOWL);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -902,7 +904,7 @@ Class BiosparkComboImpact : Actor
|
|||
{
|
||||
Super.PostBeginPlay();
|
||||
A_AlertMonsters(6000);
|
||||
SWWMUtility.DoExplosion(self,bAMBUSH?(200+Args[0]*25):150,bAMBUSH?120000:60000,bAMBUSH?500:300,bAMBUSH?350:150);
|
||||
SWWMUtility.DoExplosion(self,bAMBUSH?(200+Args[0]*25):150,bAMBUSH?120000:60000,bAMBUSH?500:300,bAMBUSH?350:150,DE_HOWL);
|
||||
A_QuakeEx(9,9,9,25,0,2000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:600,rollIntensity:1.5);
|
||||
A_StartSound("biospark/bighit",CHAN_ITEM,attenuation:.4);
|
||||
A_StartSound("biospark/bighit",CHAN_WEAPON,attenuation:.3);
|
||||
|
|
@ -970,7 +972,7 @@ Class BiosparkComboImpact : Actor
|
|||
if ( special1 > mx ) return;
|
||||
double factor = (mx-special1)/mx;
|
||||
double invfct = 1.-factor;
|
||||
SWWMUtility.DoExplosion(self,(bAMBUSH?(80+Args[0]*10):50)*factor,0.,(bAMBUSH?600.:400.)*invfct);
|
||||
SWWMUtility.DoExplosion(self,(bAMBUSH?(80+Args[0]*10):50)*factor,0.,(bAMBUSH?600.:400.)*invfct,flags:DE_HOWL);
|
||||
SWWMUtility.DoExplosion(self,0.,-12000*factor,(bAMBUSH?800:600)*invfct);
|
||||
int numpt = int(Random[ExploS](8,16)*factor);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -1124,6 +1126,8 @@ Class BiosparkBeam : Actor
|
|||
{
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,15000);
|
||||
t.hitlist[i].hitactor.DamageMobj(self,target,GetMissileDamage(0,0),'Electric',DMG_THRUSTLESS);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
}
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
|
|
@ -1268,6 +1272,8 @@ Class BiosparkBeam : Actor
|
|||
{
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,15000);
|
||||
t.hitlist[i].hitactor.DamageMobj(self,target,int(GetMissileDamage(0,0)*alpha),'Electric',DMG_THRUSTLESS);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1457,6 +1463,8 @@ Class BiosparkArc : Actor
|
|||
{
|
||||
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,-t.hitlist[i].x,GetMissileDamage(0,0)*1000);
|
||||
t.hitlist[i].hitactor.DamageMobj(self,target,GetMissileDamage(0,0),'Electric',DMG_THRUSTLESS);
|
||||
if ( t.hitlist[i].hitactor && t.hitlist[i].hitactor.bISMONSTER && !Random[Sparkster](0,3) )
|
||||
t.hitlist[i].hitactor.Howl();
|
||||
}
|
||||
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||
if ( t.Results.HitType == TRACE_HitWall )
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ enum EDoExplosionFlags
|
|||
DE_THRUWALLS = 8, // damages through geometry (no sight check)
|
||||
DE_NOTMISSILE = 16, // instigator is the source itself (normally it'd be its target pointer)
|
||||
DE_EXTRAZTHRUST = 32, // applies a higher Z thrust to enemies on ground
|
||||
DE_HOWL = 64, // 25% chance for hit enemies to howl
|
||||
};
|
||||
|
||||
const FallbackTag = "AWESOME IT'S PENIS"; // used on tag processing, please don't mind the actual string used)
|
||||
|
|
@ -824,6 +825,7 @@ Class SWWMUtility
|
|||
if ( dmg <= 0 ) continue; // no harm
|
||||
int ndmg = a.DamageMobj(Source,Instigator,dmg,(DamageType=='')?Source.DamageType:DamageType,DMG_EXPLOSION,atan2(-dir.y,-dir.x));
|
||||
if ( a && !(flags&DE_NOBLEED) ) a.TraceBleed((ndmg>0)?ndmg:dmg,Source);
|
||||
if ( (flags&DE_HOWL) && a && a.bISMONSTER && !Random[DoBlast](0,3) ) a.Howl();
|
||||
if ( !a || (a.Health <= 0) ) nkill++;
|
||||
}
|
||||
return nhit, nkill;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue