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

This commit is contained in:
Mitchell Richters 2022-10-11 12:45:49 +11:00
parent 1b499520a5
commit 9e60284ff6

View file

@ -817,15 +817,15 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
static void shootlaser(DDukeActor* actor, int p, DVector3 pos, DAngle ang) static void shootlaser(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
{ {
auto sectp = actor->sector(); auto sectp = actor->sector();
double zvel; double vel = 1024., zvel;
int j; int j;
HitInfo hit{}; HitInfo hit{};
if (p >= 0) if (p >= 0)
zvel = ps[p].horizon.sum().Tan() * 16.; setFreeAimVelocity(vel, zvel, ps[p].horizon.sum(), 16.);
else zvel = 0; else zvel = 0;
hitscan(pos, sectp, DVector3(ang.ToVector() * 1024, zvel * 64), hit, CLIPMASK1); hitscan(pos, sectp, DVector3(ang.ToVector() * vel, zvel * 64), hit, CLIPMASK1);
j = 0; j = 0;
if (hit.actor()) return; if (hit.actor()) return;