Account for portals when spawning missiles in A_FireBullets/A_CustomBulletAttack

This also gives the caller the information whether the LineAttack
hitscan passed through a portal regardless of whether it actually hit an
actor or not as a nice bonus.
This commit is contained in:
Cacodemon345 2021-05-20 13:51:15 +06:00 committed by Christoph Oelckers
commit 9a860ae445
3 changed files with 33 additions and 7 deletions

View file

@ -4604,7 +4604,7 @@ AActor *P_LineAttack(AActor *t1, DAngle angle, double distance,
}
P_GeometryLineAttack(trace, t1, damage, damageType);
if (victim != NULL) victim->unlinked = trace.unlinked;
// position a bit closer for puffs
if (nointeract || trace.HitType != TRACE_HitWall || ((trace.Line->special != Line_Horizon) || spawnSky))