From 1bc51a7367e5bec8b0bf67aaba1e1e3a415a4f2d Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 15 Oct 2020 10:20:52 +1100 Subject: [PATCH] - Duke (RR): Repair issues with horizon following changes in 09a05f354c70a3820e1efe2d8b52da4b490daba6 and partially address vehicle turning speed in `processVehicleInput()`. * Issues with vehicle input handling with `cl_syncinput 1` still remain. Will address after work. * Partially addresses #128. --- source/games/duke/src/input.cpp | 2 +- source/games/duke/src/player_r.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 0474ac738..9f8a07bca 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -805,7 +805,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I turnvel *= clamp(turnspeed * turnspeed, 0., 1.); input.fvel = p->MotoSpeed; - input.avel = turnvel; + input.avel = turnvel * (45. / 256.); } //--------------------------------------------------------------------------- diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index cbbf52ffa..b7bde4b45 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -1723,14 +1723,14 @@ static void onMotorcycle(int snum, ESyncBits &actions) { if (p->TurbCount <= 1) { - horiz = 100; + horiz = 0; p->TurbCount = 0; p->VBumpTarget = 0; p->VBumpNow = 0; } else { - horiz = 100 + ((krand() & 15) - 7); + horiz = ((krand() & 15) - 7); p->TurbCount--; p->moto_drink = (krand() & 3) - 2; } @@ -1743,7 +1743,7 @@ static void onMotorcycle(int snum, ESyncBits &actions) p->VBumpNow++; if (p->VBumpTarget < p->VBumpNow) p->VBumpNow = p->VBumpTarget; - horiz = 100 + p->VBumpNow / 3; + horiz = p->VBumpNow / 3; } else if (p->VBumpTarget < p->VBumpNow) { @@ -1753,7 +1753,7 @@ static void onMotorcycle(int snum, ESyncBits &actions) p->VBumpNow--; if (p->VBumpTarget > p->VBumpNow) p->VBumpNow = p->VBumpTarget; - horiz = 100 + p->VBumpNow / 3; + horiz = p->VBumpNow / 3; } else { @@ -2052,14 +2052,14 @@ static void onBoat(int snum, ESyncBits &actions) { if (p->TurbCount <= 1) { - horiz = 100; + horiz = 0; p->TurbCount = 0; p->VBumpTarget = 0; p->VBumpNow = 0; } else { - horiz = 100 + ((krand() & 15) - 7); + horiz = ((krand() & 15) - 7); p->TurbCount--; p->moto_drink = (krand() & 3) - 2; } @@ -2072,7 +2072,7 @@ static void onBoat(int snum, ESyncBits &actions) p->VBumpNow++; if (p->VBumpTarget < p->VBumpNow) p->VBumpNow = p->VBumpTarget; - horiz = 100 + p->VBumpNow / 3; + horiz = p->VBumpNow / 3; } else if (p->VBumpTarget < p->VBumpNow) { @@ -2082,7 +2082,7 @@ static void onBoat(int snum, ESyncBits &actions) p->VBumpNow--; if (p->VBumpTarget > p->VBumpNow) p->VBumpNow = p->VBumpTarget; - horiz = 100 + p->VBumpNow / 3; + horiz = p->VBumpNow / 3; } else {