mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Allow LineAttack's LAF_NOINTERACT to fill FTranslatedLineTarget's information.
- Originally when the flag was made, LineAttack was not yet exported. This can now be benefitted directly from ZScript.
This commit is contained in:
parent
60f82d1eb9
commit
c988a0b3a4
1 changed files with 13 additions and 13 deletions
|
@ -4754,12 +4754,19 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
|
|||
|
||||
// We must pass the unreplaced puff type here
|
||||
puff = P_SpawnPuff(t1, pufftype, bleedpos, trace.SrcAngleFromTarget, trace.SrcAngleFromTarget - 90, 2, puffFlags | PF_HITTHING, trace.Actor);
|
||||
|
||||
}
|
||||
if (victim != NULL)
|
||||
{
|
||||
victim->linetarget = trace.Actor;
|
||||
victim->attackAngleFromSource = trace.SrcAngleFromTarget;
|
||||
// With arbitrary portals this cannot be calculated so using the actual attack angle is the only option.
|
||||
victim->angleFromSource = trace.unlinked ? victim->attackAngleFromSource : t1->AngleTo(trace.Actor);
|
||||
victim->unlinked = trace.unlinked;
|
||||
}
|
||||
if (nointeract)
|
||||
{
|
||||
return puff;
|
||||
}
|
||||
}
|
||||
|
||||
// Allow puffs to inflict poison damage, so that hitscans can poison, too.
|
||||
if (puffDefaults != NULL && puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN)
|
||||
|
@ -4833,14 +4840,7 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
|
|||
P_TraceBleed(newdam > 0 ? newdam : damage, trace.HitPos, trace.Actor, trace.SrcAngleFromTarget, pitch);
|
||||
}
|
||||
}
|
||||
if (victim != NULL)
|
||||
{
|
||||
victim->linetarget = trace.Actor;
|
||||
victim->attackAngleFromSource = trace.SrcAngleFromTarget;
|
||||
// With arbitrary portals this cannot be calculated so using the actual attack angle is the only option.
|
||||
victim->angleFromSource = trace.unlinked? victim->attackAngleFromSource : t1->AngleTo(trace.Actor);
|
||||
victim->unlinked = trace.unlinked;
|
||||
}
|
||||
|
||||
}
|
||||
if (trace.Crossed3DWater || trace.CrossedWater)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue