From 9319854590f0a1fdeed4f146ac6ac404349acfed Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Mon, 27 Jul 2015 12:20:32 -0500 Subject: [PATCH] Small bugfixes - Fixed a couple tiny bugs with A_ScaleVelocity and A_ChangeVelocity using self instead of ref. --- src/thingdef/thingdef_codeptr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 77205ba132..7435bc6fe4 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -4039,7 +4039,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ScaleVelocity) return; } - INTBOOL was_moving = self->velx | self->vely | self->velz; + INTBOOL was_moving = ref->velx | ref->vely | ref->velz; ref->velx = FixedMul(ref->velx, scale); ref->vely = FixedMul(ref->vely, scale); @@ -4061,7 +4061,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ScaleVelocity) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeVelocity) { - ACTION_PARAM_START(4); + ACTION_PARAM_START(5); ACTION_PARAM_FIXED(x, 0); ACTION_PARAM_FIXED(y, 1); ACTION_PARAM_FIXED(z, 2); @@ -4102,7 +4102,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeVelocity) if (was_moving) { - CheckStopped(self); + CheckStopped(ref); } }