From eb58450e8c62755f5ecf4e77033a9fc729fd12df Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Fri, 4 Nov 2016 01:41:03 +0100 Subject: [PATCH] Remove unnecessary limit checking A signed 10 bit integer has a range of [-512, +511]. After applying the multiplicator, neither pitch nor bank will every be outside of those ranges. refs #790 --- src/plugins/simulator/fs9/simulatorfs9.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/plugins/simulator/fs9/simulatorfs9.cpp b/src/plugins/simulator/fs9/simulatorfs9.cpp index 3b8df6aa1..11ac8fe76 100644 --- a/src/plugins/simulator/fs9/simulatorfs9.cpp +++ b/src/plugins/simulator/fs9/simulatorfs9.cpp @@ -79,12 +79,7 @@ namespace BlackSimPlugin FS_PBH pbhstrct; pbhstrct.pbh = positionVelocity.pbh; int pitch = pbhstrct.pitch / CFs9Sdk::pitchMultiplier(); - if (pitch > 180.0) - pitch -= 360; - int bank = pbhstrct.bank / CFs9Sdk::bankMultiplier(); - if (bank > 180.0) - bank -= 360; // MSFS has inverted pitch and bank angles pitch = ~pitch;