Ref T118, fixed wrong color search (restrict to color liveries)

This commit is contained in:
Klaus Basan
2017-10-25 19:46:31 +02:00
parent 8473cd7eb4
commit 297426ae8e

View File

@@ -91,7 +91,8 @@ namespace BlackMisc
double bestDistance = 1.0;
for (const CLivery &livery : *this)
{
double d = livery.getColorDistance(fuselage, tail);
if (!livery.isColorLivery()) { continue; }
const double d = livery.getColorDistance(fuselage, tail);
if (d == 0.0) { return livery; } // exact match
if (d < bestDistance)
{