mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
process-order -- code to help positioning of objects in the process lists.
This commit is contained in:
parent
0c4efbb762
commit
d5f51270eb
2 changed files with 28 additions and 0 deletions
|
|
@ -20,6 +20,11 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||
// Copyright (C) 2015 Faust Logic, Inc.
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "T3D/gameBase/processList.h"
|
||||
|
||||
|
|
@ -284,5 +289,20 @@ void ProcessList::advanceObjects()
|
|||
PROFILE_END();
|
||||
}
|
||||
|
||||
ProcessObject* ProcessList::findNearestToEnd(Vector<ProcessObject*>& objs) const
|
||||
{
|
||||
if (objs.empty())
|
||||
return 0;
|
||||
|
||||
for (ProcessObject* obj = mHead.mProcessLink.prev; obj != &mHead; obj = obj->mProcessLink.prev)
|
||||
{
|
||||
for (S32 i = 0; i < objs.size(); i++)
|
||||
{
|
||||
if (obj == objs[i])
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue