Voodoo doll redesign.

This commit is contained in:
Mari the Deer 2022-02-06 02:15:05 +01:00
commit 31d4b5f5b6
17 changed files with 20 additions and 31 deletions

View file

@ -969,7 +969,7 @@ Class Demolitionist : PlayerPawn
PoisonPeriodReceived = 0;
PoisonDamageReceived = 0;
Super.Tick();
if ( gamestate != GS_LEVEL ) return;
if ( (gamestate != GS_LEVEL) || !player || (player.mo != self) ) return;
if ( hasteleported )
{
// we just got teleported, don't count the travel distance
@ -982,7 +982,6 @@ Class Demolitionist : PlayerPawn
selflight.target = self;
selflight.Tick();
}
if ( !player || (player.mo != self) ) return;
NearbyItemSparkles();
// double-check that we have these
if ( !FindInventory("AlmasteelPlating") )
@ -1655,7 +1654,7 @@ Class Demolitionist : PlayerPawn
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
if ( hnd ) hnd.tookdamage[PlayerNumber()] = true;
}
if ( mod == 'Crush' )
if ( (mod == 'Crush') && player && (player.mo == self) )
{
// check if we can break any active crushers
// (or polyobjects)
@ -1714,7 +1713,7 @@ Class Demolitionist : PlayerPawn
if ( (lastdamage > 0) && (PainChance == 0) && (level.maptime>lastmpain) )
{
lastmpain = level.maptime;
A_DemoPain();
if ( player && (player.mo == self) ) A_DemoPain();
}
PainChance = oldpchance;
if ( (Health <= 0) && (source == self) && (flags&DMG_EXPLOSION) )
@ -3524,13 +3523,13 @@ Class Demolitionist : PlayerPawn
Loop;
VoodooPain:
XZWZ A 1;
XZWZ B 1 A_DemoPain();
XZWZ CDEF 1;
XZWZ B 2 A_StartSound("voodoodoll/hit",CHAN_BODY,CHANF_OVERLAP);
XZWZ CDEF 2;
Goto VoodooSpawn;
VoodooDeath:
XZWZ A 2
{
A_DemoScream();
A_StartSound("voodoodoll/fall",CHAN_BODY,CHANF_OVERLAP);
A_NoBlocking();
}
XZWZ GHIJKLMNO 2;

View file

@ -494,7 +494,7 @@ Class DemolitionistSelfLight : Actor
}
override void Tick()
{
if ( !target || !(target is 'Demolitionist') || (Demolitionist(target).selflight != self) )
if ( !target || !target.player || (target.player.mo != target) || !(target is 'Demolitionist') || (Demolitionist(target).selflight != self) )
{
Destroy();
return;

View file

@ -369,7 +369,7 @@ Class SWWMCombatTracker : Thinker
realtag = mytarget.GetClassName();
SWWMUtility.BeautifyClassName(realtag);
}
mytag = mytarget.player?(mytarget.player.mo!=mytarget)?String.Format(StringTable.Localize("$FN_VOODOO"),mytarget.player.GetUserName()):mytarget.player.GetUserName():realtag;
mytag = mytarget.player?(mytarget.player.mo!=mytarget)?String.Format(StringTable.Localize("$FN_VOODOO"),mytarget.player.GetUserName()):mytarget.player.GetUserName():((mytarget is 'PlayerPawn')&&(!mytarget.player))?StringTable.Localize("$FN_VOODOO_NP"):realtag;
}
else mytag = "";
}
@ -533,7 +533,7 @@ Class SWWMCombatTracker : Thinker
mutated = true;
Console.Printf(StringTable.Localize("$SWWM_LTFORM"),mytag);
}
}
}// voodoo dolls don't show as friendly
bFRIENDLY = mytarget.IsFriend(players[consoleplayer].mo);
if ( mytarget.Health < lasthealth ) firsthit = true;
lasthealth = mytarget.Health;