|
@@ -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);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|