diff --git a/src/scripting/vmthunks_actors.cpp b/src/scripting/vmthunks_actors.cpp index c077adf8f..fcd445d54 100644 --- a/src/scripting/vmthunks_actors.cpp +++ b/src/scripting/vmthunks_actors.cpp @@ -1624,6 +1624,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 diff --git a/wadsrc/static/zscript/actors/actor.zs b/wadsrc/static/zscript/actors/actor.zs index 4e80a386a..c9c4f0d80 100644 --- a/wadsrc/static/zscript/actors/actor.zs +++ b/wadsrc/static/zscript/actors/actor.zs @@ -1153,6 +1153,7 @@ class Actor : Thinker native native bool A_SetSize(double newradius = -1, double newheight = -1, bool testpos = false); native void A_SprayDecal(String name, double dist = 172); native void A_SetMugshotState(String name); + native void CopyBloodColor(Actor other); native void A_RearrangePointers(int newtarget, int newmaster = AAPTR_DEFAULT, int newtracer = AAPTR_DEFAULT, int flags=0); native void A_TransferPointer(int ptr_source, int ptr_recipient, int sourcefield, int recipientfield=AAPTR_DEFAULT, int flags=0);