- Duke: Pitch-adjusted velocity for operateTripbomb() when free-aiming.

This commit is contained in:
Mitchell Richters 2022-10-11 12:57:54 +11:00
parent 3908ec0c42
commit 3a1f1c7580

View file

@ -2008,8 +2008,10 @@ int operateTripbomb(int snum)
{
auto p = &ps[snum];
HitInfo hit{};
double vel = 1024, zvel = 0;
setFreeAimVelocity(vel, zvel, p->horizon.sum(), 16.);
hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * 1024, p->horizon.sum().Tan() * 16.), hit, CLIPMASK1);
hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * vel, zvel), hit, CLIPMASK1);
if (hit.hitSector == nullptr || hit.actor())
return 0;