- Added A_JumpIfTargetOutsideMeleeRange and A_JumpIfTargetInsideMeleeRange because I thought
I could be clever and have the beggar chase after you some after you attack him, with a random chance to cease pursuit. However, that didn't look much different from his normal wandering animation, and he usually gave up before getting anywhere near you, so it was kind of pointless. I kept the action functions around anyway, since they're simple things that somebody else might find useful. - Added a melee range check to A_SentinelRefire for actors without missile states. This fixes Strife's Beggar trying to attack you when you're nowhere near him. SVN r3863 (trunk)
This commit is contained in:
parent
ef55ce8684
commit
a77705e04e
3 changed files with 36 additions and 0 deletions
|
|
@ -607,6 +607,39 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfHealthLower)
|
|||
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// State jump function
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetOutsideMeleeRange)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_STATE(jump, 0);
|
||||
|
||||
if (!self->CheckMeleeRange())
|
||||
{
|
||||
ACTION_JUMP(jump);
|
||||
}
|
||||
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// State jump function
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInsideMeleeRange)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_STATE(jump, 0);
|
||||
|
||||
if (self->CheckMeleeRange())
|
||||
{
|
||||
ACTION_JUMP(jump);
|
||||
}
|
||||
ACTION_SET_RESULT(false); // Jumps should never set the result for inventory state chains!
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// State jump function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue