mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Duke: Use player's pitch sine rather than tangent when throwing a pipebomb while crouched.
* Maintains the feel of the weapon by having the pipebomb roll along the ground. * Sign of sine is correct and allows for an expected throw behavior when looking up/down unlike original code. * Prevents an infinite tangent value from messing things up.
This commit is contained in:
parent
cfb9ebf8e5
commit
60366d298e
2 changed files with 2 additions and 2 deletions
|
@ -2199,7 +2199,7 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
if (p->on_ground && (actions & SB_CROUCH))
|
||||
{
|
||||
vel = 15/16.;
|
||||
zvel = p->horizon.sum().Tan() * 10.;
|
||||
zvel = p->horizon.sum().Sin() * 10.;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2699,7 +2699,7 @@ 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.;
|
||||
zvel = p->horizon.sum().Sin() * 10.;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue