| 145 | //----------------------------------------------------------------------------- |
| 146 | |
| 147 | void SceneZoneSpace::_onZoneAddObject( SceneObject* object, const U32* zoneIDs, U32 numZones ) |
| 148 | { |
| 149 | if( object->isVisualOccluder() ) |
| 150 | _addOccluder( object ); |
| 151 | |
| 152 | // If this isn't the root zone and the object is zone space, |
| 153 | // see if we should automatically connect the two. |
| 154 | |
| 155 | if( !isRootZone() && object->getTypeMask() & ZoneObjectType ) |
| 156 | { |
| 157 | SceneZoneSpace* zoneSpace = dynamic_cast< SceneZoneSpace* >( object ); |
| 158 | |
| 159 | // Don't connect a zone space that has the same closed off status |
| 160 | // that we have except it is assigned to the same zone group. |
| 161 | |
| 162 | if( zoneSpace && |
| 163 | ( zoneSpace->mZoneFlags.test( ZoneFlag_IsClosedOffSpace ) != mZoneFlags.test( ZoneFlag_IsClosedOffSpace ) || |
| 164 | ( zoneSpace->getZoneGroup() == getZoneGroup() && |
| 165 | zoneSpace->getZoneGroup() != InvalidZoneGroup ) ) && |
| 166 | _automaticallyConnectZoneSpace( zoneSpace ) ) |
| 167 | { |
| 168 | connectZoneSpace( zoneSpace ); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | //----------------------------------------------------------------------------- |
| 174 |
no test coverage detected