diff --git a/source/core/actorinfo.h b/source/core/actorinfo.h index 57674d5c9..d59501738 100644 --- a/source/core/actorinfo.h +++ b/source/core/actorinfo.h @@ -54,7 +54,6 @@ struct FActorInfo FActorInfo(const FActorInfo& other) { // only copy the fields that get inherited - TypeNum = other.TypeNum; DefaultFlags = other.DefaultFlags; DefaultCstat = other.DefaultCstat; SpriteSetNames = other.SpriteSetNames; diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 6cb22799d..49d28d2df 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -3956,11 +3956,13 @@ static void actCheckDudes() if (seqGetStatus(actor) < 0) genDudeTransform(actor); } #endif - if (actor->GetType() == kDudeCerberusTwoHead) + if (actor->xspr.health <= 0 && seqGetStatus(actor) < 0) { - if (actor->xspr.health <= 0 && seqGetStatus(actor) < 0) + // generalize the morph effect of the dying two headed cerberus. + auto dmt = actor->PointerVar("deathMorphType"); + if (dmt) { - actor->ChangeType(kDudeCerberusOneHead); + actor->ChangeType(dmt); actor->xspr.health = actor->startHealth() << 4; if (actor->GetTarget() != nullptr) aiSetTarget(actor, actor->GetTarget()); aiActivateDude(actor); diff --git a/source/games/blood/src/bloodactor.h b/source/games/blood/src/bloodactor.h index 90c5ea6cf..3c1f043b5 100644 --- a/source/games/blood/src/bloodactor.h +++ b/source/games/blood/src/bloodactor.h @@ -187,6 +187,7 @@ public: { memcpy(dmgControl, startdamage, sizeof(dmgControl)); } + spr.lotag = static_cast(newtype)->ActorInfo()->TypeNum; } } diff --git a/wadsrc/static/zscript/games/blood/actors/dudes.zs b/wadsrc/static/zscript/games/blood/actors/dudes.zs index ebe02d1f3..35a97b585 100644 --- a/wadsrc/static/zscript/games/blood/actors/dudes.zs +++ b/wadsrc/static/zscript/games/blood/actors/dudes.zs @@ -20,6 +20,7 @@ class BloodDudeBase : Bloodactor meta double backSpeed; meta double turnRange; meta int gibType[3]; // which gib used when explode dude + meta class deathMorphType; meta Sound explodeSound; @@ -46,6 +47,7 @@ class BloodDudeBase : Bloodactor property turnRange: turnRange; property explodeSound: explodeSound; + property deathMorphType: deathMorphType; default @@ -1143,6 +1145,7 @@ class BloodDudeCerberusTwoHead : BloodDudeBase turnrange 67.5; gibtype 7, -1, -1; dmgcontrol 16, 0, 16, 16, 0, 96, 48; + deathMorphType "BloodDudeCerberusOneHead"; } }