mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-27 13:50:49 +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)
|
FActorInfo(const FActorInfo& other)
|
||||||
{
|
{
|
||||||
// only copy the fields that get inherited
|
// only copy the fields that get inherited
|
||||||
TypeNum = other.TypeNum;
|
|
||||||
DefaultFlags = other.DefaultFlags;
|
DefaultFlags = other.DefaultFlags;
|
||||||
DefaultCstat = other.DefaultCstat;
|
DefaultCstat = other.DefaultCstat;
|
||||||
SpriteSetNames = other.SpriteSetNames;
|
SpriteSetNames = other.SpriteSetNames;
|
||||||
|
|
|
@ -3956,11 +3956,13 @@ static void actCheckDudes()
|
||||||
if (seqGetStatus(actor) < 0) genDudeTransform(actor);
|
if (seqGetStatus(actor) < 0) genDudeTransform(actor);
|
||||||
}
|
}
|
||||||
#endif
|
#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<PClassActor>("deathMorphType");
|
||||||
|
if (dmt)
|
||||||
{
|
{
|
||||||
actor->ChangeType(kDudeCerberusOneHead);
|
actor->ChangeType(dmt);
|
||||||
actor->xspr.health = actor->startHealth() << 4;
|
actor->xspr.health = actor->startHealth() << 4;
|
||||||
if (actor->GetTarget() != nullptr) aiSetTarget(actor, actor->GetTarget());
|
if (actor->GetTarget() != nullptr) aiSetTarget(actor, actor->GetTarget());
|
||||||
aiActivateDude(actor);
|
aiActivateDude(actor);
|
||||||
|
|
|
@ -187,6 +187,7 @@ public:
|
||||||
{
|
{
|
||||||
memcpy(dmgControl, startdamage, sizeof(dmgControl));
|
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 backSpeed;
|
||||||
meta double turnRange;
|
meta double turnRange;
|
||||||
meta int gibType[3]; // which gib used when explode dude
|
meta int gibType[3]; // which gib used when explode dude
|
||||||
|
meta class<BloodDudeBase> deathMorphType;
|
||||||
|
|
||||||
meta Sound explodeSound;
|
meta Sound explodeSound;
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ class BloodDudeBase : Bloodactor
|
||||||
property turnRange: turnRange;
|
property turnRange: turnRange;
|
||||||
|
|
||||||
property explodeSound: explodeSound;
|
property explodeSound: explodeSound;
|
||||||
|
property deathMorphType: deathMorphType;
|
||||||
|
|
||||||
|
|
||||||
default
|
default
|
||||||
|
@ -1143,6 +1145,7 @@ class BloodDudeCerberusTwoHead : BloodDudeBase
|
||||||
turnrange 67.5;
|
turnrange 67.5;
|
||||||
gibtype 7, -1, -1;
|
gibtype 7, -1, -1;
|
||||||
dmgcontrol 16, 0, 16, 16, 0, 96, 48;
|
dmgcontrol 16, 0, 16, 16, 0, 96, 48;
|
||||||
|
deathMorphType "BloodDudeCerberusOneHead";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue