aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs24
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs34
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs26
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs5
6 files changed, 53 insertions, 56 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index d6e905b..0405bdf 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1448,12 +1448,12 @@ namespace OpenSim.Region.Environment.Scenes
1448 Entities.Add(copy.UUID, copy); 1448 Entities.Add(copy.UUID, copy);
1449 } 1449 }
1450 1450
1451 // Since we copy from a source group that is in selected 1451 // Since we copy from a source group that is in selected
1452 // state, but the copy is shown deselected in the viewer, 1452 // state, but the copy is shown deselected in the viewer,
1453 // We need to clear the selection flag here, else that 1453 // We need to clear the selection flag here, else that
1454 // prim never gets persisted at all. The client doesn't 1454 // prim never gets persisted at all. The client doesn't
1455 // think it's selected, so it will never send a deselect... 1455 // think it's selected, so it will never send a deselect...
1456 copy.IsSelected=false; 1456 copy.IsSelected = false;
1457 1457
1458 m_numPrim++; 1458 m_numPrim++;
1459 1459
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 4d19d72..f27d0ab 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1078,7 +1078,7 @@ namespace OpenSim.Region.Environment.Scenes
1078 } 1078 }
1079 } 1079 }
1080 1080
1081 1081
1082 /// <summary> 1082 /// <summary>
1083 /// Called when an object is removed from the environment into inventory. 1083 /// Called when an object is removed from the environment into inventory.
1084 /// </summary> 1084 /// </summary>
@@ -1087,7 +1087,7 @@ namespace OpenSim.Region.Environment.Scenes
1087 public virtual void DeRezObject(Packet packet, IClientAPI remoteClient) 1087 public virtual void DeRezObject(Packet packet, IClientAPI remoteClient)
1088 { 1088 {
1089 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet; 1089 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) packet;
1090 1090
1091 LLUUID folderID = LLUUID.Zero; 1091 LLUUID folderID = LLUUID.Zero;
1092 1092
1093 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) 1093 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
@@ -1128,7 +1128,7 @@ namespace OpenSim.Region.Environment.Scenes
1128 1128
1129 else if (DeRezPacket.AgentBlock.Destination == 6) //Delete 1129 else if (DeRezPacket.AgentBlock.Destination == 6) //Delete
1130 { 1130 {
1131 permissionToTake = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); 1131 permissionToTake = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
1132 permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId); 1132 permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
1133 } 1133 }
1134 else if (DeRezPacket.AgentBlock.Destination == 9) //Return 1134 else if (DeRezPacket.AgentBlock.Destination == 9) //Return
@@ -1251,7 +1251,7 @@ namespace OpenSim.Region.Environment.Scenes
1251 DeleteSceneObject(objectGroup); 1251 DeleteSceneObject(objectGroup);
1252 } 1252 }
1253 } 1253 }
1254 } 1254 }
1255 } 1255 }
1256 1256
1257 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID) 1257 public void updateKnownAsset(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID assetID, LLUUID agentID)
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Environment.Scenes
1494 } 1494 }
1495 1495
1496 group.ResetIDs(); 1496 group.ResetIDs();
1497 1497
1498 AddSceneObject(group); 1498 AddSceneObject(group);
1499 1499
1500 // if attachment we set it's asset id so object updates can reflect that 1500 // if attachment we set it's asset id so object updates can reflect that
@@ -1583,7 +1583,7 @@ namespace OpenSim.Region.Environment.Scenes
1583 } 1583 }
1584 } 1584 }
1585 } 1585 }
1586 1586
1587 return null; 1587 return null;
1588 } 1588 }
1589 1589
@@ -1606,7 +1606,7 @@ namespace OpenSim.Region.Environment.Scenes
1606 return null; 1606 return null;
1607 } 1607 }
1608 group.ResetIDs(); 1608 group.ResetIDs();
1609 1609
1610 AddSceneObject(group); 1610 AddSceneObject(group);
1611 1611
1612 // Set the startup parameter for on_rez event and llGetStartParameter() function 1612 // Set the startup parameter for on_rez event and llGetStartParameter() function
@@ -1674,7 +1674,7 @@ namespace OpenSim.Region.Environment.Scenes
1674 if (returnobjects.Length <= 0) 1674 if (returnobjects.Length <= 0)
1675 return false; 1675 return false;
1676 1676
1677 // for the moment we're going to store them individually.. however, in the future, the rezObject 1677 // for the moment we're going to store them individually.. however, in the future, the rezObject
1678 // will be able to have more items. 1678 // will be able to have more items.
1679 1679
1680 //string returnstring = ""; 1680 //string returnstring = "";
@@ -1684,9 +1684,9 @@ namespace OpenSim.Region.Environment.Scenes
1684 // returnstring += grp.ToXmlString2(); 1684 // returnstring += grp.ToXmlString2();
1685 //} 1685 //}
1686 //returnstring += "</scene>\n"; 1686 //returnstring += "</scene>\n";
1687
1688 1687
1689 1688
1689
1690 1690
1691 bool permissionToDelete = false; 1691 bool permissionToDelete = false;
1692 1692
@@ -1697,7 +1697,7 @@ namespace OpenSim.Region.Environment.Scenes
1697 if (userInfo == null) 1697 if (userInfo == null)
1698 { 1698 {
1699 CommsManager.UserProfileCacheService.AddNewUser(returnobjects[i].OwnerID); 1699 CommsManager.UserProfileCacheService.AddNewUser(returnobjects[i].OwnerID);
1700 1700
1701 } 1701 }
1702 if (userInfo != null) 1702 if (userInfo != null)
1703 { 1703 {
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Environment.Scenes
1807 returningavatar.ControllingClient.SendAlertMessage(message); 1807 returningavatar.ControllingClient.SendAlertMessage(message);
1808 } 1808 }
1809 return false; 1809 return false;
1810 } 1810 }
1811 return true; 1811 return true;
1812 1812
1813 } 1813 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1e88018..27431ed 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes
86 private int m_incrementsof15seconds = 0; 86 private int m_incrementsof15seconds = 0;
87 private volatile bool m_backingup = false; 87 private volatile bool m_backingup = false;
88 88
89 protected string m_simulatorVersion = "unknown"; 89 protected string m_simulatorVersion = "unknown";
90 90
91 protected ModuleLoader m_moduleLoader; 91 protected ModuleLoader m_moduleLoader;
92 protected StorageManager m_storageManager; 92 protected StorageManager m_storageManager;
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Scenes
218 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 218 public Scene(RegionInfo regInfo, AgentCircuitManager authen,
219 CommunicationsManager commsMan, SceneCommunicationService sceneGridService, 219 CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
220 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, 220 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
221 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, 221 ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
222 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) 222 bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
223 { 223 {
224 m_config = config; 224 m_config = config;
@@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Scenes
287 m_statsReporter.SetObjectCapacity(objectCapacity); 287 m_statsReporter.SetObjectCapacity(objectCapacity);
288 288
289 m_simulatorVersion = simulatorVersion 289 m_simulatorVersion = simulatorVersion
290 + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() 290 + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
291 + " PhysPrim:" + m_physicalPrim.ToString(); 291 + " PhysPrim:" + m_physicalPrim.ToString();
292 } 292 }
293 293
@@ -1322,7 +1322,7 @@ namespace OpenSim.Region.Environment.Scenes
1322 /// <summary> 1322 /// <summary>
1323 /// Add an object into the scene that has come from storage 1323 /// Add an object into the scene that has come from storage
1324 /// </summary> 1324 /// </summary>
1325 /// <param name="sceneObject"></param> 1325 /// <param name="sceneObject"></param>
1326 public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject) 1326 public void AddSceneObjectFromStorage(SceneObjectGroup sceneObject)
1327 { 1327 {
1328 m_innerScene.AddSceneObjectFromStorage(sceneObject); 1328 m_innerScene.AddSceneObjectFromStorage(sceneObject);
@@ -1335,7 +1335,7 @@ namespace OpenSim.Region.Environment.Scenes
1335 public void AddSceneObject(SceneObjectGroup sceneObject) 1335 public void AddSceneObject(SceneObjectGroup sceneObject)
1336 { 1336 {
1337 m_innerScene.AddSceneObject(sceneObject); 1337 m_innerScene.AddSceneObject(sceneObject);
1338 } 1338 }
1339 1339
1340 /// <summary> 1340 /// <summary>
1341 /// Delete this object from the scene. 1341 /// Delete this object from the scene.
@@ -1344,20 +1344,20 @@ namespace OpenSim.Region.Environment.Scenes
1344 public void DeleteSceneObject(SceneObjectGroup group) 1344 public void DeleteSceneObject(SceneObjectGroup group)
1345 { 1345 {
1346 SceneObjectPart rootPart = (group).GetChildPart(group.UUID); 1346 SceneObjectPart rootPart = (group).GetChildPart(group.UUID);
1347 1347
1348 if (rootPart.PhysActor != null) 1348 if (rootPart.PhysActor != null)
1349 { 1349 {
1350 PhysicsScene.RemovePrim(rootPart.PhysActor); 1350 PhysicsScene.RemovePrim(rootPart.PhysActor);
1351 rootPart.PhysActor = null; 1351 rootPart.PhysActor = null;
1352 } 1352 }
1353 1353
1354 if (UnlinkSceneObject(group.UUID)) 1354 if (UnlinkSceneObject(group.UUID))
1355 { 1355 {
1356 EventManager.TriggerObjectBeingRemovedFromScene(group); 1356 EventManager.TriggerObjectBeingRemovedFromScene(group);
1357 EventManager.TriggerParcelPrimCountTainted(); 1357 EventManager.TriggerParcelPrimCountTainted();
1358 } 1358 }
1359 1359
1360 group.DeleteGroup(); 1360 group.DeleteGroup();
1361 group.DeleteParts(); 1361 group.DeleteParts();
1362 1362
1363 // In case anybody else retains a reference to this group, signal deletion by changing the name 1363 // In case anybody else retains a reference to this group, signal deletion by changing the name
@@ -1367,8 +1367,8 @@ namespace OpenSim.Region.Environment.Scenes
1367 // conditions where a user deletes an entity while it is being stored. Really, the update 1367 // conditions where a user deletes an entity while it is being stored. Really, the update
1368 // code needs a redesign. 1368 // code needs a redesign.
1369 group.Name = null; 1369 group.Name = null;
1370 } 1370 }
1371 1371
1372 /// <summary> 1372 /// <summary>
1373 /// Unlink the given object from the scene. Unlike delete, this just removes the record of the object - the 1373 /// Unlink the given object from the scene. Unlike delete, this just removes the record of the object - the
1374 /// object itself is not destroyed. 1374 /// object itself is not destroyed.
@@ -1376,14 +1376,14 @@ namespace OpenSim.Region.Environment.Scenes
1376 /// <param name="uuid"></param> 1376 /// <param name="uuid"></param>
1377 /// <returns>true if the object was in the scene, false if it was not</returns> 1377 /// <returns>true if the object was in the scene, false if it was not</returns>
1378 public bool UnlinkSceneObject(LLUUID uuid) 1378 public bool UnlinkSceneObject(LLUUID uuid)
1379 { 1379 {
1380 if (m_innerScene.DeleteSceneObject(uuid)) 1380 if (m_innerScene.DeleteSceneObject(uuid))
1381 { 1381 {
1382 m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID); 1382 m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID);
1383 1383
1384 return true; 1384 return true;
1385 } 1385 }
1386 1386
1387 return false; 1387 return false;
1388 } 1388 }
1389 1389
@@ -1406,7 +1406,7 @@ namespace OpenSim.Region.Environment.Scenes
1406 { 1406 {
1407 m_sceneXmlLoader.SavePrimsToXml2(fileName); 1407 m_sceneXmlLoader.SavePrimsToXml2(fileName);
1408 } 1408 }
1409 1409
1410 /// <summary> 1410 /// <summary>
1411 /// Load a prim archive into the scene. This loads both prims and their assets. 1411 /// Load a prim archive into the scene. This loads both prims and their assets.
1412 /// </summary> 1412 /// </summary>
@@ -1416,7 +1416,7 @@ namespace OpenSim.Region.Environment.Scenes
1416 IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>(); 1416 IRegionArchiver archiver = RequestModuleInterface<IRegionArchiver>();
1417 archiver.DearchiveRegion(filePath); 1417 archiver.DearchiveRegion(filePath);
1418 } 1418 }
1419 1419
1420 /// <summary> 1420 /// <summary>
1421 /// Save the prims in the scene to an archive. This saves both prims and their assets. 1421 /// Save the prims in the scene to an archive. This saves both prims and their assets.
1422 /// </summary> 1422 /// </summary>
@@ -1825,7 +1825,7 @@ namespace OpenSim.Region.Environment.Scenes
1825 1825
1826 protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child) 1826 protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child)
1827 { 1827 {
1828 1828
1829 AvatarAppearance appearance = null; 1829 AvatarAppearance appearance = null;
1830 GetAvatarAppearance(client, out appearance); 1830 GetAvatarAppearance(client, out appearance);
1831 1831
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index eae041b..66174bf 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes
176 { 176 {
177 CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset); 177 CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
178 } 178 }
179 179
180 /// <summary> 180 /// <summary>
181 /// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format 181 /// Save the prims in the current scene to an xml file in OpenSimulator's current 'xml2' format
182 /// </summary> 182 /// </summary>
@@ -188,12 +188,12 @@ namespace OpenSim.Region.Environment.Scenes
188 188
189 /// <summary> 189 /// <summary>
190 /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene 190 /// Load an xml file of prims in OpenSimulator's current 'xml2' file format to the current scene
191 /// </summary> 191 /// </summary>
192 public void LoadCurrentSceneFromXml2(string filename) 192 public void LoadCurrentSceneFromXml2(string filename)
193 { 193 {
194 CurrentOrFirstScene.LoadPrimsFromXml2(filename); 194 CurrentOrFirstScene.LoadPrimsFromXml2(filename);
195 } 195 }
196 196
197 /// <summary> 197 /// <summary>
198 /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets 198 /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets
199 /// as well as the details of the prims themselves. 199 /// as well as the details of the prims themselves.
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Scenes
203 { 203 {
204 CurrentOrFirstScene.SavePrimsToArchive(filename); 204 CurrentOrFirstScene.SavePrimsToArchive(filename);
205 } 205 }
206 206
207 /// <summary> 207 /// <summary>
208 /// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload 208 /// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload
209 /// their assets to the asset service. 209 /// their assets to the asset service.
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index cd4be99..2ad01f9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -271,11 +271,11 @@ namespace OpenSim.Region.Environment.Scenes
271 get { return m_rootPart.Text; } 271 get { return m_rootPart.Text; }
272 set { m_rootPart.Text = value; } 272 set { m_rootPart.Text = value; }
273 } 273 }
274 274
275 protected virtual bool InSceneBackup 275 protected virtual bool InSceneBackup
276 { 276 {
277 get { return true; } 277 get { return true; }
278 } 278 }
279 279
280 public bool IsSelected 280 public bool IsSelected
281 { 281 {
@@ -523,11 +523,11 @@ namespace OpenSim.Region.Environment.Scenes
523 { 523 {
524// m_log.DebugFormat( 524// m_log.DebugFormat(
525// "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID); 525// "[SCENE OBJECT GROUP]: Attaching object {0} to scene presistence sweep", UUID);
526 526
527 m_scene.EventManager.OnBackup += ProcessBackup; 527 m_scene.EventManager.OnBackup += ProcessBackup;
528 } 528 }
529 } 529 }
530 530
531 public LLVector3 GroupScale() 531 public LLVector3 GroupScale()
532 { 532 {
533 LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize); 533 LLVector3 minScale = new LLVector3(Constants.RegionSize,Constants.RegionSize,Constants.RegionSize);
@@ -1079,21 +1079,21 @@ namespace OpenSim.Region.Environment.Scenes
1079 /// </summary> 1079 /// </summary>
1080 /// <param name="datastore"></param> 1080 /// <param name="datastore"></param>
1081 public void ProcessBackup(IRegionDataStore datastore) 1081 public void ProcessBackup(IRegionDataStore datastore)
1082 { 1082 {
1083 // don't backup while it's selected or you're asking for changes mid stream. 1083 // don't backup while it's selected or you're asking for changes mid stream.
1084 if (HasGroupChanged) 1084 if (HasGroupChanged)
1085 { 1085 {
1086 if ((!IsSelected) && (RootPart != null)) 1086 if ((!IsSelected) && (RootPart != null))
1087 { 1087 {
1088 m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID); 1088 m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID);
1089 1089
1090 SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); 1090 SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false);
1091 1091
1092 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); 1092 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
1093 HasGroupChanged = false; 1093 HasGroupChanged = false;
1094 1094
1095 backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); 1095 backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
1096 1096
1097 backup_group = null; 1097 backup_group = null;
1098 } 1098 }
1099// else 1099// else
@@ -1102,10 +1102,10 @@ namespace OpenSim.Region.Environment.Scenes
1102// "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID); 1102// "[SCENE OBJECT GROUP]: Did not update persistence of object {0} since it was still selected by an avatar during the backup sweep", UUID);
1103// } 1103// }
1104 } 1104 }
1105 1105
1106 // Why is storing the inventory outside of HasGroupChanged? 1106 // Why is storing the inventory outside of HasGroupChanged?
1107 1107
1108 1108
1109 //ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); 1109 //ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); });
1110 } 1110 }
1111 1111
@@ -1192,7 +1192,7 @@ namespace OpenSim.Region.Environment.Scenes
1192 dupe.m_regionHandle = m_regionHandle; 1192 dupe.m_regionHandle = m_regionHandle;
1193 1193
1194 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 1194 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
1195 1195
1196 if (userExposed) 1196 if (userExposed)
1197 dupe.m_rootPart.TrimPermissions(); 1197 dupe.m_rootPart.TrimPermissions();
1198 1198
@@ -1223,7 +1223,7 @@ namespace OpenSim.Region.Environment.Scenes
1223 { 1223 {
1224 SetRootPartOwner(m_rootPart, cAgentID, cGroupID); 1224 SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
1225 m_rootPart.ScheduleFullUpdate(); 1225 m_rootPart.ScheduleFullUpdate();
1226 } 1226 }
1227 1227
1228 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); 1228 List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
1229 foreach (SceneObjectPart part in partList) 1229 foreach (SceneObjectPart part in partList)
@@ -1231,7 +1231,7 @@ namespace OpenSim.Region.Environment.Scenes
1231 if (part.UUID != m_rootPart.UUID) 1231 if (part.UUID != m_rootPart.UUID)
1232 { 1232 {
1233 dupe.CopyPart(part, OwnerID, GroupID, userExposed); 1233 dupe.CopyPart(part, OwnerID, GroupID, userExposed);
1234 1234
1235 if (userExposed) 1235 if (userExposed)
1236 { 1236 {
1237 SetPartOwner(part, cAgentID, cGroupID); 1237 SetPartOwner(part, cAgentID, cGroupID);
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 21e650f..19debea 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1403,10 +1403,7 @@ namespace OpenSim.Region.Environment.Scenes
1403 /// <param name="remoteAvatar"></param> 1403 /// <param name="remoteAvatar"></param>
1404 public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar) 1404 public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
1405 { 1405 {
1406 if(remoteAvatar == null) 1406 if (remoteAvatar == null || remoteAvatar.ControllingClient == null)
1407 return;
1408 IClientAPI rc=remoteAvatar.ControllingClient;
1409 if(rc == null)
1410 return; 1407 return;
1411 1408
1412 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1409 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid,