mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- partially revert 19e4393a4f
by adding the player's mouse input after calculating the true pitch of p->q16horiz
.
* Need to add `p->horizAdjust` in with `p->q16horiz` because the values passed to that variable are the same as what would have been directly added to `p->q16horiz` in `processinput()`. * Leaving mouse input to apply after calculating the pitch lets us take advantage of the calculated pitch's accuracy to provide consistent mouse input across the pitch's range.
This commit is contained in:
parent
1556e80dd2
commit
d3d9bb0823
1 changed files with 1 additions and 1 deletions
|
@ -961,7 +961,7 @@ void sethorizon(int snum, int sb_snum, double factor, bool frominput, fixed_t ad
|
|||
auto p = &ps[snum];
|
||||
|
||||
// Calculate adjustment as true pitch (Fixed point math really sucks...)
|
||||
double horizAngle = atan2((p->q16horiz + ((factor * p->horizAdjust) * 65536) + adjustment) - F16(100), F16(128)) * (512. / pi::pi());
|
||||
double horizAngle = atan2((p->q16horiz + ((factor * p->horizAdjust) * 65536)) - F16(100), F16(128)) * (512. / pi::pi()) + (adjustment / 65536.);
|
||||
|
||||
if (p->return_to_center > 0 && (sb_snum & (SKB_LOOK_UP | SKB_LOOK_DOWN)) == 0) // only snap back if no relevant button is pressed.
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue