- Added read access to an actor's melee range from DECORATE and ACS, via Blue Shadow.

SVN r4305 (trunk)
This commit is contained in:
Randy Heit 2013-06-01 02:23:27 +00:00
parent 2191b4bfa6
commit 2d13a45773
3 changed files with 5 additions and 0 deletions

View file

@ -3479,6 +3479,7 @@ enum
APROP_Height = 35,
APROP_Radius = 36,
APROP_ReactionTime = 37,
APROP_MeleeRange = 38,
};
// These are needed for ACS's APROP_RenderStyle
@ -3765,6 +3766,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
case APROP_Height: return actor->height;
case APROP_Radius: return actor->radius;
case APROP_ReactionTime:return actor->reactiontime;
case APROP_MeleeRange: return actor->meleerange;
default: return 0;
}
@ -3808,6 +3810,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value)
case APROP_Height:
case APROP_Radius:
case APROP_ReactionTime:
case APROP_MeleeRange:
return (GetActorProperty(tid, property) == value);
// Boolean values need to compare to a binary version of value

View file

@ -87,6 +87,7 @@ DEFINE_MEMBER_VARIABLE(stamina, AActor)
DEFINE_MEMBER_VARIABLE(height, AActor)
DEFINE_MEMBER_VARIABLE(radius, AActor)
DEFINE_MEMBER_VARIABLE(reactiontime, AActor)
DEFINE_MEMBER_VARIABLE(meleerange, AActor)
//==========================================================================

View file

@ -60,6 +60,7 @@ ACTOR Actor native //: Thinker
native fixed_t height;
native fixed_t radius;
native int reactiontime;
native fixed_t meleerange;
// Meh, MBF redundant functions. Only for DeHackEd support.
action native A_Turn(float angle = 0);