From dc40db3b33b3d0cf3ab3f49e80715368b53cdf65 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 26 Jul 2002 22:23:49 +0000 Subject: [PATCH] Modified the partial ssg tree deletion algorithm so it correctly preserves subtrees that may be connected into the scene graph multiple times. (i.e. our random ground cover objects.) --- src/Scenery/tileentry.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 97d5d372e..b6bb04198 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -702,7 +702,7 @@ static int fgPartialFreeSSGtree( ssgBranch *b, int n ) { 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; -- 2.39.5