Use GetDefaultByType for copying blood colors instead of spawning and then destroying the reference actors.

This commit is contained in:
Mari the Deer 2025-06-27 21:02:25 +02:00
commit 05642fcf86
3 changed files with 8 additions and 11 deletions

View file

@ -398,21 +398,18 @@ extend Class SWWMHandler
// vanilla blood color changes
if ( (e.Thing.GetClassName() == 'BaronOfHell') || (e.Thing.GetClassName() == 'HellKnight') || (e.Thing.GetClassName() == 'Bishop') || (e.Thing.GetClassName() == 'Korax') )
{
let gb = Actor.Spawn('GreenBloodReference');
let gb = GetDefaultByType('GreenBloodReference');
e.Thing.CopyBloodColor(gb);
gb.Destroy();
}
else if ( e.Thing.GetClassName() == 'Cacodemon' )
{
let bb = Actor.Spawn('BlueBloodReference');
let bb = GetDefaultByType('BlueBloodReference');
e.Thing.CopyBloodColor(bb);
bb.Destroy();
}
else if ( (e.Thing.GetClassName() == 'Wizard') || (e.Thing.GetClassName() == 'Heresiarch') || (e.Thing.GetClassName() == 'Sorcerer2') )
{
let pb = Actor.Spawn('PurpleBloodReference');
let pb = GetDefaultByType('PurpleBloodReference');
e.Thing.CopyBloodColor(pb);
pb.Destroy();
}
else if ( e.Thing.GetClassName() == 'LostSoul' )
e.Thing.bNOBLOOD = true;