mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
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:
committed by
Klaus Basan
parent
7f90652b2f
commit
eb58450e8c
@@ -79,12 +79,7 @@ namespace BlackSimPlugin
|
|||||||
FS_PBH pbhstrct;
|
FS_PBH pbhstrct;
|
||||||
pbhstrct.pbh = positionVelocity.pbh;
|
pbhstrct.pbh = positionVelocity.pbh;
|
||||||
int pitch = pbhstrct.pitch / CFs9Sdk::pitchMultiplier();
|
int pitch = pbhstrct.pitch / CFs9Sdk::pitchMultiplier();
|
||||||
if (pitch > 180.0)
|
|
||||||
pitch -= 360;
|
|
||||||
|
|
||||||
int bank = pbhstrct.bank / CFs9Sdk::bankMultiplier();
|
int bank = pbhstrct.bank / CFs9Sdk::bankMultiplier();
|
||||||
if (bank > 180.0)
|
|
||||||
bank -= 360;
|
|
||||||
|
|
||||||
// MSFS has inverted pitch and bank angles
|
// MSFS has inverted pitch and bank angles
|
||||||
pitch = ~pitch;
|
pitch = ~pitch;
|
||||||
|
|||||||
Reference in New Issue
Block a user