From c21eef7afb592c72cb5019e9a5f5332dc5d57a5d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 14 Jan 2009 10:32:20 +0000 Subject: [PATCH] From Lionel Lagarde, "The last field of the LightPointAppearancePalette is only valid for > 15.8 version of the format." --- src/osgPlugins/OpenFlight/PaletteRecords.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/OpenFlight/PaletteRecords.cpp b/src/osgPlugins/OpenFlight/PaletteRecords.cpp index 65fa7fe57..52bf13323 100644 --- a/src/osgPlugins/OpenFlight/PaletteRecords.cpp +++ b/src/osgPlugins/OpenFlight/PaletteRecords.cpp @@ -666,7 +666,12 @@ protected: appearance->fadeOutDuration = in.readFloat32(); appearance->LODRangeRatio = in.readFloat32(); appearance->LODScale = in.readFloat32(); - appearance->texturePatternIndex = in.readInt16(-1); + + if(document.version() > VERSION_15_8) + appearance->texturePatternIndex = in.readInt16(-1); + else + appearance->texturePatternIndex = -1; + // The final short is reserved; don't bother reading it. // Add to pool