Browse Source

fix bam loading for multibundle characters

David Rose 18 years ago
parent
commit
e6e7a3e4a9
1 changed files with 8 additions and 1 deletions
  1. 8 1
      panda/src/chan/partBundleNode.cxx

+ 8 - 1
panda/src/chan/partBundleNode.cxx

@@ -160,7 +160,14 @@ fillin(DatagramIterator &scan, BamReader* manager) {
     num_bundles = scan.get_uint16();
     num_bundles = scan.get_uint16();
   }
   }
 
 
-  for (int i = 0; i < num_bundles; ++i) {
+  nassertv(num_bundles >= 1);
+
+  // Bundle 0.  We already have a slot for this one.
+  manager->read_pointer(scan);
+
+  // Remaining bundles.  Push a new slot for each one.
+  for (int i = 1; i < num_bundles; ++i) {
     manager->read_pointer(scan);
     manager->read_pointer(scan);
+    _bundles.push_back(NULL);
   }
   }
 }
 }