mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- added Xaser's submission for no impact damage from blasting.
SVN r3693 (trunk)
This commit is contained in:
parent
ff25785781
commit
37d9519673
5 changed files with 23 additions and 8 deletions
|
@ -22,7 +22,7 @@
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner, const PClass * blasteffect)
|
||||
void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner, const PClass * blasteffect, bool dontdamage)
|
||||
{
|
||||
angle_t angle,ang;
|
||||
AActor *mo;
|
||||
|
@ -67,7 +67,7 @@ void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner
|
|||
{
|
||||
// Players handled automatically
|
||||
}
|
||||
else
|
||||
else if (!dontdamage)
|
||||
{
|
||||
victim->flags2 |= MF2_BLASTED;
|
||||
}
|
||||
|
@ -83,6 +83,7 @@ enum
|
|||
BF_USEAMMO = 1,
|
||||
BF_DONTWARN = 2,
|
||||
BF_AFFECTBOSSES = 4,
|
||||
BF_NOIMPACTDAMAGE = 8,
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
|
@ -145,6 +146,6 @@ DEFINE_ACTION_FUNCTION_PARAMS (AActor, A_Blast)
|
|||
{ // Out of range
|
||||
continue;
|
||||
}
|
||||
BlastActor (mo, strength, speed, self, blasteffect);
|
||||
BlastActor (mo, strength, speed, self, blasteffect, !!(blastflags & BF_NOIMPACTDAMAGE));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -474,7 +474,7 @@ void P_AimCamera (AActor *t1, fixed_t &x, fixed_t &y, fixed_t &z, sector_t *&sec
|
|||
|
||||
// [RH] Means of death
|
||||
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance,
|
||||
FName damageType, bool hurtSelf, bool dodamage=true, int fulldamagedistance=0);
|
||||
FName damageType, bool hurtSelf, bool dodamage=true, int fulldamagedistance=0, bool noimpactdamage=false);
|
||||
|
||||
void P_DelSector_List();
|
||||
void P_DelSeclist(msecnode_t *); // phares 3/16/98
|
||||
|
|
|
@ -4446,7 +4446,7 @@ CUSTOM_CVAR (Float, splashfactor, 1.f, CVAR_SERVERINFO)
|
|||
//==========================================================================
|
||||
|
||||
void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int bombdistance, FName bombmod,
|
||||
bool DamageSource, bool bombdodamage, int fulldamagedistance)
|
||||
bool DamageSource, bool bombdodamage, int fulldamagedistance, bool noimpactdamage)
|
||||
{
|
||||
if (bombdistance <= 0)
|
||||
return;
|
||||
|
@ -4552,7 +4552,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
|
|||
int damage = (int)points;
|
||||
|
||||
if (bombdodamage) P_DamageMobj (thing, bombspot, bombsource, damage, bombmod);
|
||||
else if (thing->player == NULL) thing->flags2 |= MF2_BLASTED;
|
||||
else if (thing->player == NULL && !noimpactdamage) thing->flags2 |= MF2_BLASTED;
|
||||
|
||||
if (!(thing->flags & MF_ICECORPSE))
|
||||
{
|
||||
|
|
|
@ -776,6 +776,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
|||
}
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
RTF_AFFECTSOURCE = 1,
|
||||
RTF_NOIMPACTDAMAGE = 2,
|
||||
};
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// A_RadiusThrust
|
||||
|
@ -787,9 +793,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
|
|||
ACTION_PARAM_START(3);
|
||||
ACTION_PARAM_INT(force, 0);
|
||||
ACTION_PARAM_INT(distance, 1);
|
||||
ACTION_PARAM_BOOL(affectSource, 2);
|
||||
ACTION_PARAM_INT(thrustFlags, 2);
|
||||
ACTION_PARAM_INT(fullthrustdistance, 3);
|
||||
|
||||
bool affectSource = !!(thrustFlags & RTF_AFFECTSOURCE);
|
||||
bool noimpactdamage = !!(thrustFlags & RTF_NOIMPACTDAMAGE);
|
||||
|
||||
bool sourcenothrust = false;
|
||||
|
||||
if (force <= 0) force = 128;
|
||||
|
@ -803,7 +812,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
|
|||
}
|
||||
int sourceflags2 = self->target != NULL ? self->target->flags2 : 0;
|
||||
|
||||
P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false, fullthrustdistance);
|
||||
P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false, fullthrustdistance, noimpactdamage);
|
||||
P_CheckSplash(self, distance << FRACBITS);
|
||||
|
||||
if (sourcenothrust)
|
||||
|
|
|
@ -123,10 +123,15 @@ const int MSF_Standard = 0;
|
|||
const int MSF_Classic = 1;
|
||||
const int MSF_DontHurt = 2;
|
||||
|
||||
// Flags for A_RadiusThrust
|
||||
const int RTF_AFFECTSOURCE = 1;
|
||||
const int RTF_NOIMPACTDAMAGE = 2;
|
||||
|
||||
// Flags for A_Blast
|
||||
const int BF_USEAMMO = 1;
|
||||
const int BF_DONTWARN = 2;
|
||||
const int BF_AFFECTBOSSES = 4;
|
||||
const int BF_NOIMPACTDAMAGE = 8;
|
||||
|
||||
// Flags for A_SeekerMissile
|
||||
const int SMF_LOOK = 1;
|
||||
|
|
Loading…
Reference in a new issue