- restored A_CountdownArg to what it looked like before the scripting branch.

The new version did not work as expected anymore.
This commit is contained in:
Christoph Oelckers 2016-02-17 11:42:45 +01:00
parent 45108e9bb8
commit 42c6245a50

View file

@ -3269,15 +3269,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIf)
// A_CountdownArg
//
//===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CountdownArg)
{
PARAM_ACTION_PROLOGUE;
PARAM_INT(argnum);
PARAM_INT(cnt);
PARAM_STATE_OPT(state) { state = self->FindState(NAME_Death); }
if (argnum >= 0 && argnum < (int)countof(self->args))
{
if (!self->args[argnum]--)
if (cnt<0 || cnt >= 5) return;
if (!self->args[cnt]--)
{
if (self->flags&MF_MISSILE)
{
@ -3288,16 +3288,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CountdownArg)
P_DamageMobj(self, NULL, NULL, self->health, NAME_None, DMG_FORCED);
}
else
{
self->SetState(self->FindState(NAME_Death));
}
}
else
{
self->SetState(state);
}
}
return 0;
}
//============================================================================