mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge branch 'alpha40_zonePicker2' of https://github.com/Azaezel/Torque3D into Preview4_0
This commit is contained in:
commit
9524e77596
|
|
@ -28,8 +28,8 @@
|
|||
#include "scene/mixin/sceneAmbientSoundObject.impl.h"
|
||||
#include "scene/mixin/scenePolyhedralObject.impl.h"
|
||||
|
||||
#include "gui/worldEditor/worldEditor.h"
|
||||
#include "scene/sceneManager.h"
|
||||
#include "gui/worldEditor/worldEditor.h"
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1( Zone );
|
||||
|
||||
|
|
@ -103,27 +103,27 @@ bool Zone::_doSelect(void* object, const char* index, const char* data)
|
|||
void Zone::selectWithin()
|
||||
{
|
||||
SimpleQueryList sql;
|
||||
//getContainer()->polyhedronFindObjects(getPolyhedron(), 0xFFFFFFFF, SimpleQueryList::insertionCallback, &sql);
|
||||
|
||||
//replace the above with this once we stort out how to look up the managed zoneID from the insatnce itself
|
||||
Zone* zoneClient = (Zone*)getClientObject();
|
||||
SceneZoneSpaceManager* zoneManager = zoneClient->getSceneManager()->getZoneManager();
|
||||
if (zoneManager)
|
||||
if (zoneClient)
|
||||
{
|
||||
for (U32 zoneId = zoneClient->mZoneRangeStart; zoneId < zoneClient->mZoneRangeStart + zoneClient->mNumZones; ++zoneId)
|
||||
for (SceneZoneSpaceManager::ZoneContentIterator iter(zoneManager, zoneId, false); iter.isValid(); ++iter)
|
||||
{
|
||||
SceneObject* obj = (SceneObject*)iter->getServerObject();
|
||||
bool fullyEnclosed = true;
|
||||
SceneZoneSpaceManager* zoneManager = zoneClient->getSceneManager()->getZoneManager();
|
||||
if (zoneManager)
|
||||
{
|
||||
for (U32 zoneId = zoneClient->mZoneRangeStart; zoneId < zoneClient->mZoneRangeStart + zoneClient->mNumZones; ++zoneId)
|
||||
for (SceneZoneSpaceManager::ZoneContentIterator iter(zoneManager, zoneId, false); iter.isValid(); ++iter)
|
||||
{
|
||||
SceneObject* obj = (SceneObject*)iter->getServerObject();
|
||||
bool fullyEnclosed = true;
|
||||
|
||||
for (SceneObject::ObjectZonesIterator zoneIter(obj); zoneIter.isValid(); ++zoneIter)
|
||||
{
|
||||
if (*zoneIter != zoneId)
|
||||
fullyEnclosed = false;
|
||||
}
|
||||
if (fullyEnclosed)
|
||||
sql.insertObject(obj);
|
||||
}
|
||||
if (fullyEnclosed)
|
||||
sql.insertObject(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue