- scriptified Actor.GetBloodType as a virtual function to allow mods more flexibility here.

- made CameraHeight a modifiable actor property - it was readonly before.
- allow accessing the type constants from ZScript, this required quite a bit of explicit coding because the type system has no capabilities to search for basic types by name.
This commit is contained in:
Christoph Oelckers 2017-02-28 12:11:25 +01:00
commit 1311f08f47
8 changed files with 129 additions and 92 deletions

View file

@ -1121,37 +1121,6 @@ DEFINE_PROPERTY(bloodcolor, C, Actor)
}
//==========================================================================
//
//==========================================================================
DEFINE_PROPERTY(bloodtype, Sss, Actor)
{
PROP_STRING_PARM(str, 0)
PROP_STRING_PARM(str1, 1)
PROP_STRING_PARM(str2, 2)
assert(info->IsKindOf(RUNTIME_CLASS(PClassActor)));
PClassActor *ainfo = static_cast<PClassActor *>(info);
FName blood = str;
// normal blood
ainfo->BloodType = blood;
if (PROP_PARM_COUNT > 1)
{
blood = str1;
}
// blood splatter
ainfo->BloodType2 = blood;
if (PROP_PARM_COUNT > 2)
{
blood = str2;
}
// axe blood
ainfo->BloodType3 = blood;
}
//==========================================================================
//
//==========================================================================
@ -1387,8 +1356,7 @@ DEFINE_PROPERTY(stealthalpha, F, Actor)
DEFINE_PROPERTY(cameraheight, F, Actor)
{
PROP_DOUBLE_PARM(i, 0);
assert(info->IsKindOf(RUNTIME_CLASS(PClassActor)));
static_cast<PClassActor *>(info)->CameraHeight = i;
defaults->CameraHeight = i;
}
//==========================================================================