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.)
This commit is contained in:
parent
f05e8f95e2
commit
dc40db3b33
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue