mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-27 05:40:51 +00:00
- add all the horizon values before converting into true pitch inside sethorizon()
.
This commit is contained in:
parent
573cb363ae
commit
19e4393a4f
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 - F16(100), F16(128)) * (512. / pi::pi()) + (factor * p->horizAdjust) + (adjustment / 65536.);
|
||||
double horizAngle = atan2((p->q16horiz + ((factor * p->horizAdjust) * 65536) + adjustment) - F16(100), F16(128)) * (512. / pi::pi());
|
||||
|
||||
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