mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-28 03:40:47 +00:00
- RR: Pitch-adjusted velocity for operateweapon()
when free-aiming.
This commit is contained in:
parent
9a25b1d3f5
commit
0c4ad84c2e
1 changed files with 6 additions and 4 deletions
|
@ -2699,12 +2699,13 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
if (p->on_ground && (actions & SB_CROUCH))
|
||||
{
|
||||
vel = 15 / 16.;
|
||||
zvel = p->horizon.sum().Tan() * 10.;
|
||||
setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.);
|
||||
}
|
||||
else
|
||||
{
|
||||
vel = 140 / 16.;
|
||||
zvel = -4 + p->horizon.sum().Tan() * 10.;
|
||||
setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.);
|
||||
zvel -= 4;
|
||||
}
|
||||
|
||||
auto spawned = CreateActor(p->cursector, p->pos + p->angle.ang.ToVector() * 16, DYNAMITE, -16, DVector2(0.140625, 0.140625),
|
||||
|
@ -3106,12 +3107,13 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
if (p->on_ground && (actions & SB_CROUCH) && !p->OnMotorcycle)
|
||||
{
|
||||
vel = 15 / 16.;
|
||||
zvel = p->horizon.sum().Tan() * 10.;
|
||||
setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.);
|
||||
}
|
||||
else
|
||||
{
|
||||
vel = 2.;
|
||||
zvel = -4 + p->horizon.sum().Tan() * 10.;
|
||||
setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.);
|
||||
zvel -= 4;
|
||||
}
|
||||
|
||||
CreateActor(p->cursector, p->pos + p->angle.ang.ToVector() * 16, POWDERKEG, -16, DVector2(0.140625, 0.140625), p->angle.ang, vel * 2, zvel, pact, 1);
|
||||
|
|
Loading…
Reference in a new issue