Added Actor.CopyBloodColor to copy another existing actor's blood color.

This commit is contained in:
nashmuhandes 2020-03-24 01:21:39 +08:00 committed by Christoph Oelckers
commit cb6514cc05
2 changed files with 18 additions and 0 deletions

View file

@ -1629,6 +1629,23 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_NoBlocking, A_Unblock)
return 0;
}
static void CopyBloodColor(AActor* self, AActor* other)
{
if (self && other)
{
self->BloodColor = other->BloodColor;
self->BloodTranslation = other->BloodTranslation;
}
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, CopyBloodColor, CopyBloodColor)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_OBJECT(other, AActor);
CopyBloodColor(self, other);
return 0;
}
//=====================================================================================
//
// Inventory exports