- SW: Pitch-adjusted velocity for InitFistAttack().

This commit is contained in:
Mitchell Richters 2022-10-11 15:25:16 +11:00 committed by Christoph Oelckers
parent 2577ea21f2
commit bcf09c3037

View file

@ -12425,9 +12425,10 @@ int InitFistAttack(PLAYER* pp)
// all this is to break glass // all this is to break glass
{ {
HitInfo hit{}; HitInfo hit{};
double daz = pp->horizon.horiz.Tan() * 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.); double dax = 1024., daz = 0;
auto daang = pp->angle.ang; auto daang = pp->angle.ang;
FAFhitscan(pp->pos, pp->cursector, DVector3(pp->angle.ang.ToVector() * 1024, daz), hit, CLIPMASK_MISSILE); setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
FAFhitscan(pp->pos, pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
if (hit.hitSector == nullptr) if (hit.hitSector == nullptr)
return 0; return 0;