mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- added handling of MF3_FOILINVUL for A_BFGSpray. This function needs special treatment because the shooting player is considered the inflictor of the spray damage.
This commit is contained in:
parent
897a17309b
commit
992ba0bbf4
3 changed files with 4 additions and 2 deletions
|
@ -589,7 +589,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray)
|
||||||
damage += (pr_bfgspray() & 7) + 1;
|
damage += (pr_bfgspray() & 7) + 1;
|
||||||
|
|
||||||
thingToHit = linetarget;
|
thingToHit = linetarget;
|
||||||
int newdam = P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash));
|
int newdam = P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash),
|
||||||
|
spray != NULL && (spray->flags3 & MF3_FOILINVUL)? DMG_FOILINVUL : 0);
|
||||||
P_TraceBleed (newdam > 0 ? newdam : damage, thingToHit, self->target);
|
P_TraceBleed (newdam > 0 ? newdam : damage, thingToHit, self->target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -965,7 +965,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
||||||
{ // actor is invulnerable
|
{ // actor is invulnerable
|
||||||
if (target->player == NULL)
|
if (target->player == NULL)
|
||||||
{
|
{
|
||||||
if (inflictor == NULL || !(inflictor->flags3 & MF3_FOILINVUL))
|
if (inflictor == NULL || (!(inflictor->flags3 & MF3_FOILINVUL) && !(flags & DMG_FOILINVUL)))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -554,6 +554,7 @@ enum EDmgFlags
|
||||||
DMG_FORCED = 8,
|
DMG_FORCED = 8,
|
||||||
DMG_NO_FACTOR = 16,
|
DMG_NO_FACTOR = 16,
|
||||||
DMG_PLAYERATTACK = 32,
|
DMG_PLAYERATTACK = 32,
|
||||||
|
DMG_FOILINVUL = 64,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue