diff --git a/src/QD3D/3DMFParser.cpp b/src/QD3D/3DMFParser.cpp index c0a24e2..58a83f5 100644 --- a/src/QD3D/3DMFParser.cpp +++ b/src/QD3D/3DMFParser.cpp @@ -398,18 +398,17 @@ void Q3MetaFileParser::Parse_atar(uint32_t chunkSize) } else if (isVertexAttribute && attributeType == kQ3AttributeTypeDiffuseColor) // used in Bugdom's Global_Models2.3dmf { - Assert(false, "per-vertex diffuse color not supported in Nanosaur"); -#if 0 printf("vertex diffuse"); // Assert(positionInArray == 0, "PIA must be 0 for colors"); - Assert(currentMesh->vertexNormals, "current mesh has no vertex color array"); + Assert(!currentMesh->vertexColors, "current mesh already had a vertex color array"); + currentMesh->vertexColors = __Q3Alloc(currentMesh->numPoints, 'TMvc'); for (int i = 0; i < currentMesh->numPoints; i++) { currentMesh->vertexColors[i].r = f.Read(); currentMesh->vertexColors[i].g = f.Read(); currentMesh->vertexColors[i].b = f.Read(); + currentMesh->vertexColors[i].a = 1.0f; } -#endif } else if (isTriangleAttribute && attributeType == kQ3AttributeTypeNormal) // face normals {