mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-27 05:40:46 +00:00
deathMorphType property
This commit is contained in:
parent
16bde524ff
commit
4f7ed35655
4 changed files with 9 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
actor->ChangeType(kDudeCerberusOneHead);
|
||||
// generalize the morph effect of the dying two headed cerberus.
|
||||
auto dmt = actor->PointerVar<PClassActor>("deathMorphType");
|
||||
if (dmt)
|
||||
{
|
||||
actor->ChangeType(dmt);
|
||||
actor->xspr.health = actor->startHealth() << 4;
|
||||
if (actor->GetTarget() != nullptr) aiSetTarget(actor, actor->GetTarget());
|
||||
aiActivateDude(actor);
|
||||
|
|
|
@ -187,6 +187,7 @@ public:
|
|||
{
|
||||
memcpy(dmgControl, startdamage, sizeof(dmgControl));
|
||||
}
|
||||
spr.lotag = static_cast<PClassActor*>(newtype)->ActorInfo()->TypeNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<BloodDudeBase> 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";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue