From 9f71c7cb4e07a00e5bec7a82151b37b23e346e72 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 20 Apr 2013 21:32:03 +0000 Subject: [PATCH] - added Xaser's reactiontime for ACS and DECORATE expression patch. SVN r4222 (trunk) --- src/p_acs.cpp | 7 +++++++ src/thingdef/thingdef_expression.cpp | 1 + wadsrc/static/actors/actor.txt | 1 + 3 files changed, 9 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 7bfc87f392..05e9a34a27 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2847,6 +2847,7 @@ enum APROP_Stamina = 34, APROP_Height = 35, APROP_Radius = 36, + APROP_ReactionTime = 37, }; // These are needed for ACS's APROP_RenderStyle @@ -3058,6 +3059,10 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) actor->stamina = value; break; + case APROP_ReactionTime: + actor->reactiontime = value; + break; + default: // do nothing. break; @@ -3128,6 +3133,7 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_Stamina: return actor->stamina; case APROP_Height: return actor->height; case APROP_Radius: return actor->radius; + case APROP_ReactionTime:return actor->reactiontime; default: return 0; } @@ -3170,6 +3176,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value) case APROP_Stamina: case APROP_Height: case APROP_Radius: + case APROP_ReactionTime: return (GetActorProperty(tid, property) == value); // Boolean values need to compare to a binary version of value diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 93dc4086e6..1e4065d289 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -86,6 +86,7 @@ DEFINE_MEMBER_VARIABLE(accuracy, AActor) DEFINE_MEMBER_VARIABLE(stamina, AActor) DEFINE_MEMBER_VARIABLE(height, AActor) DEFINE_MEMBER_VARIABLE(radius, AActor) +DEFINE_MEMBER_VARIABLE(reactiontime, AActor) //========================================================================== diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 9ec0e5fe63..8e76ca3747 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -58,6 +58,7 @@ ACTOR Actor native //: Thinker native int stamina; native fixed_t height; native fixed_t radius; + native int reactiontime; // Meh, MBF redundant functions. Only for DeHackEd support. action native A_Turn(float angle = 0);