From 301c061ec3520ba592fe9b3c75b5f6c10f0a5145 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Fri, 23 Jan 2015 10:24:23 -0600 Subject: [PATCH] - Added pointer for A_SetRoll. --- src/thingdef/thingdef_codeptr.cpp | 13 +++++++++++-- wadsrc/static/actors/actor.txt | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 32bc9d315..324500f7c 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -4010,10 +4010,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetPitch) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRoll) { - ACTION_PARAM_START(2); + ACTION_PARAM_START(3); ACTION_PARAM_ANGLE(roll, 0); ACTION_PARAM_INT(flags, 1); - self->SetRoll(roll, !!(flags & SPF_INTERPOLATE)); + ACTION_PARAM_INT(ptr, 2); + + AActor *ref = COPY_AAPTR(self, ptr); + + if (!ref) + { + ACTION_SET_RESULT(false); + return; + } + ref->SetRoll(roll, !!(flags & SPF_INTERPOLATE)); } //=========================================================================== diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index f3c567c71..f0e68d9a5 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -291,7 +291,7 @@ ACTOR Actor native //: Thinker action native A_MonsterRefire(int chance, state label); action native A_SetAngle(float angle = 0, int flags = 0, int ptr = AAPTR_DEFAULT); action native A_SetPitch(float pitch, int flags = 0, int ptr = AAPTR_DEFAULT); - action native A_SetRoll(float roll, int flags = 0); + action native A_SetRoll(float roll, int flags = 0, int ptr = AAPTR_DEFAULT); action native A_ScaleVelocity(float scale, int ptr = AAPTR_DEFAULT); action native A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0, int ptr = AAPTR_DEFAULT); action native A_SetArg(int pos, int value);