From bf58879b08134a04342d58d02e10a7407119c1b4 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 4 Apr 2023 15:14:44 +1000 Subject: [PATCH] - Duke/RRRA: Fix HUD tilting when reversing motorcycle backwards. --- source/games/duke/src/player_r.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index a94b0c963..41f597bca 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -1726,11 +1726,12 @@ static void onMotorcycle(int snum, ESyncBits &actions) auto p = &ps[snum]; auto pact = p->GetActor(); + unsigned flags = outVehicleFlags(p, actions); + doVehicleTilting(p, Sgn(p->sync.avel) * Sgn(p->MotoSpeed), !p->on_ground || p->sync.avel); + if (p->MotoSpeed < 0 || p->moto_underwater) p->MotoSpeed = 0; - unsigned flags = outVehicleFlags(p, actions); - doVehicleTilting(p, Sgn(p->sync.avel), !p->on_ground || p->sync.avel); doVehicleSounds(p, pact, flags, 187, 188, 214, 189); doVehicleDrunk(p); doVehicleThrottling(p, pact, flags, 2, 15, p->moto_on_oil ? 2 : 4, 70, -30);