Browse Source

pgraph: fix BillboardEffect regression with older models

In older BAM files (version <= 6.42), _fixed_depth will have an uncertain value after loading, leading to incorrect transform calculations, which cause rendering issues (see issue #474)
Derzsi Dániel 7 years ago
parent
commit
b7d638e53d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      panda/src/pgraph/billboardEffect.cxx

+ 2 - 0
panda/src/pgraph/billboardEffect.cxx

@@ -375,5 +375,7 @@ fillin(DatagramIterator &scan, BamReader *manager) {
   if (manager->get_file_minor_ver() >= 43) {
     _look_at.fillin(scan, manager);
     _fixed_depth = scan.get_bool();
+  } else {
+    _fixed_depth = false;
   }
 }