subtrees that may be connected into the scene graph multiple times.
(i.e. our random ground cover objects.)
int num_deletes = 0;
for ( int i = 0; i < b->getNumKids(); ++i ) {
ssgEntity *kid = b->getKid(i);
- if ( kid->isAKindOf( ssgTypeBranch() ) ) {
+ if ( kid->isAKindOf( ssgTypeBranch() ) && kid->getRef() <= 1 ) {
int result = fgPartialFreeSSGtree( (ssgBranch *)kid, n );
num_deletes += result;
n -= result;