- fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context.

This commit is contained in:
Christoph Oelckers 2018-12-18 20:38:25 +01:00
commit 462fe891bd
5 changed files with 26 additions and 11 deletions

View file

@ -425,7 +425,7 @@ AActor &AActor::operator= (const AActor &other)
//
//==========================================================================
bool AActor::InStateSequence(FState * newstate, FState * basestate)
static int InStateSequence(FState * newstate, FState * basestate)
{
if (basestate == NULL) return false;
@ -440,12 +440,19 @@ bool AActor::InStateSequence(FState * newstate, FState * basestate)
return false;
}
DEFINE_ACTION_FUNCTION(AActor, InStateSequence)
DEFINE_ACTION_FUNCTION(AActor, InStateSequence, InStateSequence)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_PROLOGUE;
PARAM_POINTER(newstate, FState);
PARAM_POINTER(basestate, FState);
ACTION_RETURN_BOOL(self->InStateSequence(newstate, basestate));
ACTION_RETURN_BOOL(InStateSequence(newstate, basestate));
}
DEFINE_ACTION_FUNCTION(FState, InStateSequence, InStateSequence)
{
PARAM_SELF_STRUCT_PROLOGUE(FState);
PARAM_POINTER(basestate, FState);
ACTION_RETURN_BOOL(InStateSequence(self, basestate));
}