Просмотр исходного кода

oops, animcontrols are lost now that leak is patched

David Rose 24 лет назад
Родитель
Сommit
8082344eae
2 измененных файлов с 6 добавлено и 2 удалено
  1. 3 1
      panda/src/framework/framework.cxx
  2. 3 1
      panda/src/framework/framework_multimon.cxx

+ 3 - 1
panda/src/framework/framework.cxx

@@ -1296,6 +1296,9 @@ int framework_main(int argc, char *argv[]) {
   root = new NamedNode("root");
   root = new NamedNode("root");
   first_arc = new RenderRelation(render, root, 100);
   first_arc = new RenderRelation(render, root, 100);
 
 
+  // This will hold the AnimControls for animated characters.
+  AnimControlCollection anim_controls;
+
   ////// for gridded stuff
   ////// for gridded stuff
   PT_Node *pNodeArr=NULL;
   PT_Node *pNodeArr=NULL;
   RenderRelation **pRRptrArr=NULL;
   RenderRelation **pRRptrArr=NULL;
@@ -1519,7 +1522,6 @@ int framework_main(int argc, char *argv[]) {
 
 
     // If we happened to load up both a character file and its
     // If we happened to load up both a character file and its
     // matching animation file, attempt to bind them together now.
     // matching animation file, attempt to bind them together now.
-    AnimControlCollection anim_controls;
     auto_bind(root, anim_controls, ~0);
     auto_bind(root, anim_controls, ~0);
     anim_controls.loop_all(true);
     anim_controls.loop_all(true);
   }
   }

+ 3 - 1
panda/src/framework/framework_multimon.cxx

@@ -1399,6 +1399,9 @@ int framework_main(int argc, char *argv[]) {
   root = new NamedNode("root");
   root = new NamedNode("root");
   first_arc = new RenderRelation(render, root, 100);
   first_arc = new RenderRelation(render, root, 100);
 
 
+  // This will hold the AnimControls for animated characters.
+  AnimControlCollection anim_controls;
+
   ////// for gridded stuff
   ////// for gridded stuff
   PT_Node *pNodeArr=NULL;
   PT_Node *pNodeArr=NULL;
   RenderRelation **pRRptrArr=NULL;
   RenderRelation **pRRptrArr=NULL;
@@ -1622,7 +1625,6 @@ int framework_main(int argc, char *argv[]) {
 
 
     // If we happened to load up both a character file and its
     // If we happened to load up both a character file and its
     // matching animation file, attempt to bind them together now.
     // matching animation file, attempt to bind them together now.
-    AnimControlCollection anim_controls;
     auto_bind(root, anim_controls, ~0);
     auto_bind(root, anim_controls, ~0);
     anim_controls.loop_all(true);
     anim_controls.loop_all(true);
   }
   }