mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- Need to set it on the puff itself, not the defaults.
This commit is contained in:
parent
fc05a3bb2f
commit
24f1bfae99
1 changed files with 8 additions and 8 deletions
|
@ -3760,11 +3760,11 @@ AActor *P_LineAttack(AActor *t1, angle_t angle, fixed_t distance,
|
|||
puff = P_SpawnPuff(t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, puffFlags | PF_HITTHING);
|
||||
}
|
||||
|
||||
if (puffDefaults != NULL && trace.Actor != NULL)
|
||||
if (puffDefaults != NULL && trace.Actor != NULL && puff != NULL)
|
||||
{
|
||||
if (puffDefaults->flags7 && MF7_HITTARGET) puffDefaults->target = trace.Actor;
|
||||
if (puffDefaults->flags7 && MF7_HITMASTER) puffDefaults->master = trace.Actor;
|
||||
if (puffDefaults->flags7 && MF7_HITTRACER) puffDefaults->tracer = trace.Actor;
|
||||
if (puffDefaults->flags7 && MF7_HITTARGET) puff->target = trace.Actor;
|
||||
if (puffDefaults->flags7 && MF7_HITMASTER) puff->master = trace.Actor;
|
||||
if (puffDefaults->flags7 && MF7_HITTRACER) puff->tracer = trace.Actor;
|
||||
}
|
||||
|
||||
// Allow puffs to inflict poison damage, so that hitscans can poison, too.
|
||||
|
@ -4209,11 +4209,11 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
|
|||
{
|
||||
P_SpawnPuff(source, puffclass, x, y, z, (source->angle + angleoffset) - ANG90, 1, puffflags);
|
||||
}
|
||||
if (hitactor != NULL && puffDefaults != NULL)
|
||||
if (hitactor != NULL && puffDefaults != NULL && thepuff != NULL)
|
||||
{
|
||||
if (puffDefaults->flags7 & MF7_HITTARGET) puffDefaults->target = hitactor;
|
||||
if (puffDefaults->flags7 & MF7_HITMASTER) puffDefaults->master = hitactor;
|
||||
if (puffDefaults->flags7 & MF7_HITTRACER) puffDefaults->tracer = hitactor;
|
||||
if (puffDefaults->flags7 & MF7_HITTARGET) thepuff->target = hitactor;
|
||||
if (puffDefaults->flags7 & MF7_HITMASTER) thepuff->master = hitactor;
|
||||
if (puffDefaults->flags7 & MF7_HITTRACER) thepuff->tracer = hitactor;
|
||||
}
|
||||
if (puffDefaults && puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue