mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
SVN r3201 (trunk)
This commit is contained in:
parent
8ccf552d09
commit
91f3f61ead
2 changed files with 17 additions and 2 deletions
|
@ -4433,7 +4433,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
|
|||
|
||||
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;
|
||||
if (bombsource == thing)
|
||||
|
|
|
@ -933,11 +933,26 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
|
|||
ACTION_PARAM_FIXED(distance, 1);
|
||||
ACTION_PARAM_BOOL(affectSource, 2);
|
||||
|
||||
bool sourcenothrust = false;
|
||||
|
||||
if (force <= 0) force = 128;
|
||||
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_CheckSplash(self, distance<<FRACBITS);
|
||||
P_CheckSplash(self, distance << FRACBITS);
|
||||
|
||||
if (sourcenothrust)
|
||||
{
|
||||
self->target->flags2 |= MF2_NODMGTHRUST;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue