Browse Source

fix runaway traverser time

David Rose 20 years ago
parent
commit
2d3e344a2a

+ 2 - 1
panda/src/collide/collisionLevelState.I

@@ -24,7 +24,8 @@
 ////////////////////////////////////////////////////////////////////
 INLINE CollisionLevelState::
 CollisionLevelState(const NodePath &node_path) :
-  _node_path(node_path)
+  _node_path(node_path),
+  _current(0)
 {
 }
 

+ 1 - 1
panda/src/collide/collisionTraverser.cxx

@@ -513,8 +513,8 @@ prepare_colliders(CollisionTraverser::LevelStates &level_states,
           // That's the limit.  Save off this level state and make a
           // new one.
           level_states.push_back(level_state);
-          level_state.reserve(min(num_colliders, max_colliders));
           level_state.clear();
+          level_state.reserve(min(num_colliders, max_colliders));
         }
       }
     }