//----------------------------------------------------------------------- // Update all the zone info for a given node. This function // makes sure the home zone of the node is correct, and references // to any zones it is visiting are added and a reference to the // node is added to the visitor lists of any zone it is visiting. // public void UpdatePCZSceneNode( PCZSceneNode pczsn ) { // Skip if root Zone has been destroyed (shutdown conditions) if ( null == this.defaultZone ) { return; } // Skip if the node is the sceneroot node if ( pczsn == RootSceneNode ) { return; } // clear all references to visiting zones pczsn.ClearVisitingZonesMap(); // Find the current home zone of the node associated with the pczsn entry. UpdateHomeZone( pczsn, false ); //* The following function does the following: //* 1) Check all portals in the home zone - if the node is touching the portal //* then add the node to the connected zone as a visitor //* 2) Recurse into visited zones in case the node spans several zones //* // (recursively) check each portal of home zone to see if the node is touching if ( null != pczsn.HomeZone && pczsn.AllowToVisit ) { pczsn.HomeZone.CheckNodeAgainstPortals( pczsn, null ); } // update zone-specific data for the node for any zones that require it pczsn.UpdateZoneData(); }