SVN r3201 (trunk)

This commit is contained in:
Randy Heit 2011-05-11 04:29:19 +00:00
parent 8ccf552d09
commit 91f3f61ead
2 changed files with 17 additions and 2 deletions

View File

@ -4433,7 +4433,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST)) if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST))
{ {
if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST)) if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST))
{ {
thrust = points * 0.5f / (double)thing->Mass; thrust = points * 0.5f / (double)thing->Mass;
if (bombsource == thing) if (bombsource == thing)

View File

@ -933,11 +933,26 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
ACTION_PARAM_FIXED(distance, 1); ACTION_PARAM_FIXED(distance, 1);
ACTION_PARAM_BOOL(affectSource, 2); ACTION_PARAM_BOOL(affectSource, 2);
bool sourcenothrust = false;
if (force <= 0) force = 128; if (force <= 0) force = 128;
if (distance <= 0) distance = force; if (distance <= 0) distance = force;
// Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless.
if (self->target != NULL && self->target->flags2 & MF2_NODMGTHRUST)
{
sourcenothrust = true;
self->target->flags2 &= ~MF2_NODMGTHRUST;
}
int sourceflags2 = self->target != NULL ? self->target->flags2 : 0;
P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false); P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false);
P_CheckSplash(self, distance<<FRACBITS); P_CheckSplash(self, distance << FRACBITS);
if (sourcenothrust)
{
self->target->flags2 |= MF2_NODMGTHRUST;
}
} }
//========================================================================== //==========================================================================