mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-22 11:31:11 +00:00
- Duke: Pitch-adjusted velocity for shootlaser()
when free-aiming.
This commit is contained in:
parent
1b499520a5
commit
9e60284ff6
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue