mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +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;
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user