- fixed: 'Bloodtype' cannot use the generic property definition because it needs special handling for optional arguments. This reinstates the native handler.

This commit is contained in:
Christoph Oelckers 2017-03-01 20:20:46 +01:00
parent b5d4a59465
commit 0de79042d4
2 changed files with 28 additions and 1 deletions

View file

@ -1059,6 +1059,33 @@ DEFINE_PROPERTY(bloodcolor, C, Actor)
static_cast<PClassActor *>(info)->BloodColor = pe; static_cast<PClassActor *>(info)->BloodColor = pe;
} }
//==========================================================================
//
//==========================================================================
DEFINE_PROPERTY(bloodtype, Sss, Actor)
{
PROP_STRING_PARM(str, 0)
PROP_STRING_PARM(str1, 1)
PROP_STRING_PARM(str2, 2)
FName blood = str;
// normal blood
defaults->NameVar("BloodType") = blood;
if (PROP_PARM_COUNT > 1)
{
blood = str1;
}
// blood splatter
defaults->NameVar("BloodType2") = blood;
if (PROP_PARM_COUNT > 2)
{
blood = str2;
}
// axe blood
defaults->NameVar("BloodType3") = blood;
}
//========================================================================== //==========================================================================
// //

View file

@ -224,7 +224,7 @@ class Actor : Thinker native
Property DontHurtShooter: DontHurtShooter; Property DontHurtShooter: DontHurtShooter;
Property ExplosionRadius: ExplosionRadius; Property ExplosionRadius: ExplosionRadius;
Property ExplosionDamage: ExplosionDamage; Property ExplosionDamage: ExplosionDamage;
Property BloodType: BloodType, BloodType2, BloodType3; //Property BloodType: BloodType, BloodType2, BloodType3;
Property FastSpeed: FastSpeed; Property FastSpeed: FastSpeed;
Property HowlSound: HowlSound; Property HowlSound: HowlSound;
Property GibHealth: GibHealth; Property GibHealth: GibHealth;