From 06ba4fe3513d57bb3c40e7b530b010299061010d Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Tue, 7 Mar 2017 20:47:43 +0100 Subject: [PATCH] YASim wrap bugfix with version check to maintain compatibility with old aircraft config. --- src/FDM/YASim/Wing.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FDM/YASim/Wing.cpp b/src/FDM/YASim/Wing.cpp index 0bb3eac14..12a20728c 100644 --- a/src/FDM/YASim/Wing.cpp +++ b/src/FDM/YASim/Wing.cpp @@ -341,8 +341,14 @@ Surface* Wing::newSurface(float* pos, float* orient, float chord, s->setStall(1, stallAoA * 0.8f); s->setStallWidth(1, _stallWidth * 0.5f); } else { - s->setStall(1, stallAoA); + s->setStall(1, stallAoA); + if( _version->isVersionOrNewer( Version::YASIM_VERSION_2017_2 )) { + // what was presumably meant s->setStallWidth(1, _stallWidth); + } else { + // old code; presumably a copy&paste error + s->setStall(1, _stallWidth); + } } // The "reverse" stalls are unmeasurable junk. Just use 13deg and