diff --git a/src/Objects/newmat.cxx b/src/Objects/newmat.cxx index dab03e1eb..9d11efa97 100644 --- a/src/Objects/newmat.cxx +++ b/src/Objects/newmat.cxx @@ -119,7 +119,7 @@ FGNewMat::read_properties (const SGPropertyNode * props) wrapu = props->getBoolValue("wrapu", true); wrapv = props->getBoolValue("wrapv", true); mipmap = props->getBoolValue("mipmap", true); - light_coverage = props->getDoubleValue("light-coverage"); + light_coverage = props->getDoubleValue("light-coverage", 0.0); ambient[0] = props->getDoubleValue("ambient/r", 0.0); ambient[1] = props->getDoubleValue("ambient/g", 0.0); @@ -160,6 +160,7 @@ FGNewMat::init () wrapu = true; wrapv = true; mipmap = true; + light_coverage = 0.0; texture_loaded = false; refcount = 0; for (int i = 0; i < 4; i++) diff --git a/src/Objects/obj.cxx b/src/Objects/obj.cxx index 5ad88014a..dba84040c 100644 --- a/src/Objects/obj.cxx +++ b/src/Objects/obj.cxx @@ -942,6 +942,7 @@ bool fgBinObjLoad( const string& path, const bool is_base, material = tmp_mat; } vertex_index = pts_v[i]; + normal_index = pts_n[i]; tex_index.clear(); ssgLeaf *leaf = gen_leaf( path, GL_POINTS, material, nodes, normals, texcoords,