From fdfd8c2a3544d8bdc9e6c2a5f30a3b26fd2b4203 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 14 Sep 2022 19:30:20 +0200 Subject: [PATCH] - change for pyoff --- source/games/duke/src/player_d.cpp | 6 ++---- source/games/duke/src/player_r.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index bf005eb7d..edc612d53 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -3084,10 +3084,8 @@ HORIZONLY: { p->pycount += 52; p->pycount &= 2047; - p->pyoff = BobVal(p->pycount) * pact->int_xvel(); - - const double factor = 64. / 1596; // What is 1596? - p->pyoff = abs(pact->int_xvel() * BobVal(p->pycount)) * factor; + const double factor = 1024. / 1596; // What is 1596? + p->pyoff = abs(pact->vel.X * BobVal(p->pycount)) * factor; } } else if (psectlotag != 2 && psectlotag != 1) diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index e7c4f45ef..5b13b3fda 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -3874,8 +3874,8 @@ HORIZONLY: { p->pycount += 52; p->pycount &= 2047; - const double factor = 64. / 1596; // What is 1596? - p->pyoff = abs(pact->int_xvel() * BobVal(p->pycount)) * factor; + const double factor = 1024. / 1596; // What is 1596? + p->pyoff = abs(pact->vel.X * BobVal(p->pycount)) * factor; } } else if (psectlotag != ST_2_UNDERWATER && psectlotag != 1 && (!isRRRA() || !p->sea_sick_stat))