mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge branch 'alpha40_zonePicker2' of https://github.com/Azaezel/Torque3D into Preview4_0
This commit is contained in:
commit
9524e77596
1 changed files with 14 additions and 14 deletions
|
|
@ -28,8 +28,8 @@
|
||||||
#include "scene/mixin/sceneAmbientSoundObject.impl.h"
|
#include "scene/mixin/sceneAmbientSoundObject.impl.h"
|
||||||
#include "scene/mixin/scenePolyhedralObject.impl.h"
|
#include "scene/mixin/scenePolyhedralObject.impl.h"
|
||||||
|
|
||||||
#include "gui/worldEditor/worldEditor.h"
|
|
||||||
#include "scene/sceneManager.h"
|
#include "scene/sceneManager.h"
|
||||||
|
#include "gui/worldEditor/worldEditor.h"
|
||||||
|
|
||||||
IMPLEMENT_CO_NETOBJECT_V1( Zone );
|
IMPLEMENT_CO_NETOBJECT_V1( Zone );
|
||||||
|
|
||||||
|
|
@ -103,27 +103,27 @@ bool Zone::_doSelect(void* object, const char* index, const char* data)
|
||||||
void Zone::selectWithin()
|
void Zone::selectWithin()
|
||||||
{
|
{
|
||||||
SimpleQueryList sql;
|
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();
|
Zone* zoneClient = (Zone*)getClientObject();
|
||||||
SceneZoneSpaceManager* zoneManager = zoneClient->getSceneManager()->getZoneManager();
|
if (zoneClient)
|
||||||
if (zoneManager)
|
|
||||||
{
|
{
|
||||||
for (U32 zoneId = zoneClient->mZoneRangeStart; zoneId < zoneClient->mZoneRangeStart + zoneClient->mNumZones; ++zoneId)
|
SceneZoneSpaceManager* zoneManager = zoneClient->getSceneManager()->getZoneManager();
|
||||||
for (SceneZoneSpaceManager::ZoneContentIterator iter(zoneManager, zoneId, false); iter.isValid(); ++iter)
|
if (zoneManager)
|
||||||
{
|
{
|
||||||
SceneObject* obj = (SceneObject*)iter->getServerObject();
|
for (U32 zoneId = zoneClient->mZoneRangeStart; zoneId < zoneClient->mZoneRangeStart + zoneClient->mNumZones; ++zoneId)
|
||||||
bool fullyEnclosed = true;
|
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)
|
for (SceneObject::ObjectZonesIterator zoneIter(obj); zoneIter.isValid(); ++zoneIter)
|
||||||
{
|
{
|
||||||
if (*zoneIter != zoneId)
|
if (*zoneIter != zoneId)
|
||||||
fullyEnclosed = false;
|
fullyEnclosed = false;
|
||||||
|
}
|
||||||
|
if (fullyEnclosed)
|
||||||
|
sql.insertObject(obj);
|
||||||
}
|
}
|
||||||
if (fullyEnclosed)
|
}
|
||||||
sql.insertObject(obj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue