]> git.mxchange.org Git - flightgear.git/blobdiff - src/Objects/newmat.cxx
Patch from Melchior Franz:
[flightgear.git] / src / Objects / newmat.cxx
index 7ac493dea296160ad40c82a552f0bcf1c32ceb1d..9d11efa97ef67c2ef8bc934fc4954a95a43a5142 100644 (file)
@@ -76,9 +76,10 @@ FGNewMat::FGNewMat (const SGPropertyNode * props)
     build_ssg_state(false);
 }
 
-FGNewMat::FGNewMat (const string &texture_path)
+FGNewMat::FGNewMat (const string &texpath)
 {
     init();
+    texture_path = texpath;
     build_ssg_state(true);
 }
 
@@ -118,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);
@@ -159,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++)