A_Explode now returns the number of actors damaged and can be used in expressions.

- Enemies that do not take damage in any way are not counted.
This commit is contained in:
Major Cooke 2016-08-08 13:01:43 -05:00 committed by Christoph Oelckers
commit ec14dd94a7
5 changed files with 29 additions and 18 deletions

View file

@ -1414,13 +1414,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
}
}
P_RadiusAttack (self, self->target, damage, distance, self->DamageType, flags, fulldmgdistance);
int count = P_RadiusAttack (self, self->target, damage, distance, self->DamageType, flags, fulldmgdistance);
P_CheckSplash(self, distance);
if (alert && self->target != NULL && self->target->player != NULL)
{
P_NoiseAlert(self->target, self);
}
return 0;
ACTION_RETURN_INT(count);
}
//==========================================================================