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
This commit is contained in:
Roland Winklmeier
2016-11-04 01:41:03 +01:00
committed by Klaus Basan
parent 7f90652b2f
commit eb58450e8c

View File

@@ -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;