From Jason Daly, fix for 14.2 color records in versions of OpenFlight files.

This commit is contained in:
Robert Osfield
2002-11-05 07:50:40 +00:00
parent dc3aed2332
commit afa27a13ec

View File

@@ -1029,7 +1029,21 @@ void ConvertFromFLT::setColor ( FaceRecord *rec, SFace *pSFace, DynGeoSet *dgset
if (bPackedColor)
_faceColor = pSFace->PrimaryPackedColor.get();
else
_faceColor = pColorPool->getColor(pSFace->dwPrimaryColorIndex);
{
if (rec->getFlightVersion() >= 1540)
{
_faceColor =
pColorPool->getColor(pSFace->dwPrimaryColorIndex);
}
else // Version 14.2, 15.0
{
// The field now called wPrimaryNameIndex was
// originally the primary color/intensity code
// for OpenFlight v14.2 and v15.0 files
_faceColor =
pColorPool->getColor(pSFace->wPrimaryNameIndex);
}
}
}
}
else // Version 11, 12 & 13