Add species parameter to A_RadiusThrust

This is the last parameter for A_RadiusThrust() DECORATE function.
If it is omitted or none, then A_RadiusThrust will behave as usual.

If it is set for some species name, it witt thrust only that species.
Of course, these species should be +VULNERABLE to be thrustable.
This commit is contained in:
makise-homura 2020-08-20 23:55:00 +03:00 committed by Christoph Oelckers
commit 5720a54da4
5 changed files with 14 additions and 8 deletions

View file

@ -1243,9 +1243,9 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, GetRadiusDamage, P_GetRadiusDamage)
ACTION_RETURN_INT(P_GetRadiusDamage(self, thing, damage, distance, fulldmgdistance, oldradiusdmg));
}
static int RadiusAttack(AActor *self, AActor *bombsource, int bombdamage, int bombdistance, int damagetype, int flags, int fulldamagedistance)
static int RadiusAttack(AActor *self, AActor *bombsource, int bombdamage, int bombdistance, int damagetype, int flags, int fulldamagedistance, int species)
{
return P_RadiusAttack(self, bombsource, bombdamage, bombdistance, ENamedName(damagetype), flags, fulldamagedistance);
return P_RadiusAttack(self, bombsource, bombdamage, bombdistance, ENamedName(damagetype), flags, fulldamagedistance, ENamedName(species));
}
DEFINE_ACTION_FUNCTION_NATIVE(AActor, RadiusAttack, RadiusAttack)
@ -1257,7 +1257,8 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, RadiusAttack, RadiusAttack)
PARAM_INT(damagetype);
PARAM_INT(flags);
PARAM_INT(fulldamagedistance);
ACTION_RETURN_INT(RadiusAttack(self, bombsource, bombdamage, bombdistance, damagetype, flags, fulldamagedistance));
PARAM_INT(species);
ACTION_RETURN_INT(RadiusAttack(self, bombsource, bombdamage, bombdistance, damagetype, flags, fulldamagedistance, species));
}
static int ZS_GetSpriteIndex(int sprt)