mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #209 from Azaezel/alpha40_ScopeStackShenanigans
adress #203
This commit is contained in:
commit
b98d0a946b
1 changed files with 5 additions and 3 deletions
|
|
@ -361,9 +361,11 @@ void SFXWorld< NUM_DIMENSIONS, Object >::_onScopeIn( Object object )
|
||||||
F32 sortValue = _getSortValue( object );
|
F32 sortValue = _getSortValue( object );
|
||||||
while( iter != mScopeStack.end() && iter->mSortValue >= sortValue )
|
while( iter != mScopeStack.end() && iter->mSortValue >= sortValue )
|
||||||
++ iter;
|
++ iter;
|
||||||
|
// If the object is already on the scope stack, do not add it again
|
||||||
// Insert the object into the stack.
|
S32 index = _findScope(object);
|
||||||
|
if (index != -1)
|
||||||
|
return;
|
||||||
|
// Insert the object into the stack.
|
||||||
mScopeStack.insert( iter, Scope( sortValue, object ) );
|
mScopeStack.insert( iter, Scope( sortValue, object ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue