Merge pull request #209 from Azaezel/alpha40_ScopeStackShenanigans

adress #203
This commit is contained in:
Brian Roberts 2020-06-20 05:32:04 -05:00 committed by GitHub
commit b98d0a946b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -361,9 +361,11 @@ void SFXWorld< NUM_DIMENSIONS, Object >::_onScopeIn( Object object )
F32 sortValue = _getSortValue( object );
while( iter != mScopeStack.end() && iter->mSortValue >= sortValue )
++ iter;
// Insert the object into the stack.
// If the object is already on the scope stack, do not add it again
S32 index = _findScope(object);
if (index != -1)
return;
// Insert the object into the stack.
mScopeStack.insert( iter, Scope( sortValue, object ) );
}