mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix crashes loading bam files
This commit is contained in:
parent
151b661547
commit
0a675eae03
@ -364,10 +364,13 @@ compute_internal_bounds(int pipeline_stage) const {
|
|||||||
// Now actually compute the bounding volume by putting it around all
|
// Now actually compute the bounding volume by putting it around all
|
||||||
// of our solids' bounding volumes.
|
// of our solids' bounding volumes.
|
||||||
pvector<const BoundingVolume *> child_volumes;
|
pvector<const BoundingVolume *> child_volumes;
|
||||||
|
pvector<CPT(BoundingVolume) > cpt_volumes;
|
||||||
|
|
||||||
Solids::const_iterator gi;
|
Solids::const_iterator gi;
|
||||||
for (gi = _solids.begin(); gi != _solids.end(); ++gi) {
|
for (gi = _solids.begin(); gi != _solids.end(); ++gi) {
|
||||||
child_volumes.push_back((*gi)->get_bounds());
|
CPT(BoundingVolume) volume = (*gi)->get_bounds();
|
||||||
|
cpt_volumes.push_back(volume);
|
||||||
|
child_volumes.push_back(volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
const BoundingVolume **child_begin = &child_volumes[0];
|
const BoundingVolume **child_begin = &child_volumes[0];
|
||||||
|
@ -331,8 +331,9 @@ fillin(DatagramIterator &scan, BamReader *manager) {
|
|||||||
_effective_normal.read_datagram(scan);
|
_effective_normal.read_datagram(scan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The viz is always stale after reading from a bam file.
|
// The viz is always stale after reading from a bam file. So is the
|
||||||
_flags |= F_viz_geom_stale;
|
// bounding volume.
|
||||||
|
_flags |= F_viz_geom_stale | F_internal_bounds_stale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user