From 2ce1debe8d2097587af38f4ee55d26d40953be28 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 9 Nov 2012 23:06:40 +0000 Subject: [PATCH] - Added FDARI's get actor height and radius patch. SVN r3955 (trunk) --- src/p_acs.cpp | 6 ++++++ src/thingdef/thingdef_expression.cpp | 3 +++ wadsrc/static/actors/actor.txt | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 3feafc99e..ea65f1cca 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2766,6 +2766,8 @@ enum APROP_Mass = 32, APROP_Accuracy = 33, APROP_Stamina = 34, + APROP_Height = 35, + APROP_Radius = 36, }; // These are needed for ACS's APROP_RenderStyle @@ -3045,6 +3047,8 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_Mass: return actor->Mass; case APROP_Accuracy: return actor->accuracy; case APROP_Stamina: return actor->stamina; + case APROP_Height: return actor->height; + case APROP_Radius: return actor->radius; default: return 0; } @@ -3085,6 +3089,8 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value) case APROP_Mass: case APROP_Accuracy: case APROP_Stamina: + case APROP_Height: + case APROP_Radius: 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 af22129a6..a5644b88f 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -84,6 +84,9 @@ DEFINE_MEMBER_VARIABLE(Damage, AActor) DEFINE_MEMBER_VARIABLE(Score, AActor) DEFINE_MEMBER_VARIABLE(accuracy, AActor) DEFINE_MEMBER_VARIABLE(stamina, AActor) +DEFINE_MEMBER_VARIABLE(height, AActor) +DEFINE_MEMBER_VARIABLE(radius, AActor) + //========================================================================== // diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 3b22d5734..f7ee26769 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -56,6 +56,8 @@ ACTOR Actor native //: Thinker native int score; native int accuracy; native int stamina; + native fixed_t height; + native fixed_t radius; // Meh, MBF redundant functions. Only for DeHackEd support. action native A_Turn(float angle = 0);