From e54c7f6e460752a912521579738df0d678ff4611 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 14 Aug 2008 22:58:17 +0000 Subject: [PATCH] - Fixed: The count parameter of A_Jump is a constant, not an expression. SVN r1171 (trunk) --- docs/rh-log.txt | 1 + src/thingdef/thingdef.h | 2 ++ src/thingdef/thingdef_codeptr.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index e171b1fad..1ba5fdf50 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ August 14, 2008 (Changes by Graf Zahl) +- Fixed: The count parameter of A_Jump is a constant, not an expression. - Fixed: A_Jump used a wrong index into the jump address table. - Fixed: The recent changes in the DECORATE parser require the special parameter to A_CallSpecial to be an expression, not a constant. diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index 2b37662a4..0010cce96 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -196,6 +196,8 @@ struct StateCallData #define ACTION_PARAM_START(count) +#define ACTION_PARAM_CONST(var, i) \ + int var = StateParameters[ParameterIndex+i]; #define ACTION_PARAM_INT(var, i) \ int var = EvalExpressionI(StateParameters[ParameterIndex+i], self); #define ACTION_PARAM_BOOL(var,i) \ diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 2aa67bc36..512306421 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -448,7 +448,7 @@ static void DoJump(AActor * self, FState * CallingState, int offset, StateCallDa DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Jump) { ACTION_PARAM_START(3); - ACTION_PARAM_INT(count, 0); + ACTION_PARAM_CONST(count, 0); ACTION_PARAM_INT(maxchance, 1); ACTION_PARAM_VARARG(jumps, 2);