diff options
author | Justin Clark-Casey (justincc) | 2012-02-15 02:41:50 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-15 02:41:50 +0000 |
commit | 96843f2b17e60dfb275b6564facf7000e1451ea0 (patch) | |
tree | 23e28153e45d69480a7184484e89a35cd2e16856 /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' into 0.7.3-post-fixes (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-96843f2b17e60dfb275b6564facf7000e1451ea0.zip opensim-SC_OLD-96843f2b17e60dfb275b6564facf7000e1451ea0.tar.gz opensim-SC_OLD-96843f2b17e60dfb275b6564facf7000e1451ea0.tar.bz2 opensim-SC_OLD-96843f2b17e60dfb275b6564facf7000e1451ea0.tar.xz |
Merge branch 'master' into 0.7.3-post-fixes
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
13 files changed, 162 insertions, 48 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 5dfd3e0..f678d07 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -148,7 +148,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
148 | x = m_inventoryDeletes.Dequeue(); | 148 | x = m_inventoryDeletes.Dequeue(); |
149 | 149 | ||
150 | m_log.DebugFormat( | 150 | m_log.DebugFormat( |
151 | "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", left, x.action, x.objectGroups.Count); | 151 | "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", |
152 | left, x.action, x.objectGroups.Count); | ||
152 | 153 | ||
153 | try | 154 | try |
154 | { | 155 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6d7559e..5a5307c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -347,6 +347,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
347 | { | 347 | { |
348 | item.Name = itemUpd.Name; | 348 | item.Name = itemUpd.Name; |
349 | item.Description = itemUpd.Description; | 349 | item.Description = itemUpd.Description; |
350 | |||
351 | // m_log.DebugFormat( | ||
352 | // "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", | ||
353 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | ||
354 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | ||
355 | |||
350 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) | 356 | if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) |
351 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; | 357 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; |
352 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; | 358 | item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; |
@@ -355,6 +361,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
355 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; | 361 | item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; |
356 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) | 362 | if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) |
357 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; | 363 | item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; |
364 | |||
365 | // m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags); | ||
366 | |||
358 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; | 367 | item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; |
359 | item.GroupID = itemUpd.GroupID; | 368 | item.GroupID = itemUpd.GroupID; |
360 | item.GroupOwned = itemUpd.GroupOwned; | 369 | item.GroupOwned = itemUpd.GroupOwned; |
@@ -2170,8 +2179,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
2170 | m_sceneGraph.DelinkObjects(parts); | 2179 | m_sceneGraph.DelinkObjects(parts); |
2171 | } | 2180 | } |
2172 | 2181 | ||
2182 | /// <summary> | ||
2183 | /// Link the scene objects containing the indicated parts to a root object. | ||
2184 | /// </summary> | ||
2185 | /// <param name="client"></param> | ||
2186 | /// <param name="parentPrimId">A root prim id of the object which will be the root prim of the resulting linkset.</param> | ||
2187 | /// <param name="childPrimIds">A list of child prims for the objects that should be linked in.</param> | ||
2173 | public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) | 2188 | public void LinkObjects(IClientAPI client, uint parentPrimId, List<uint> childPrimIds) |
2174 | { | 2189 | { |
2190 | LinkObjects(client.AgentId, parentPrimId, childPrimIds); | ||
2191 | } | ||
2192 | |||
2193 | /// <summary> | ||
2194 | /// Link the scene objects containing the indicated parts to a root object. | ||
2195 | /// </summary> | ||
2196 | /// <param name="agentId">The ID of the user linking.</param> | ||
2197 | /// <param name="parentPrimId">A root prim id of the object which will be the root prim of the resulting linkset.</param> | ||
2198 | /// <param name="childPrimIds">A list of child prims for the objects that should be linked in.</param> | ||
2199 | public void LinkObjects(UUID agentId, uint parentPrimId, List<uint> childPrimIds) | ||
2200 | { | ||
2175 | List<UUID> owners = new List<UUID>(); | 2201 | List<UUID> owners = new List<UUID>(); |
2176 | 2202 | ||
2177 | List<SceneObjectPart> children = new List<SceneObjectPart>(); | 2203 | List<SceneObjectPart> children = new List<SceneObjectPart>(); |
@@ -2183,7 +2209,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2183 | return; | 2209 | return; |
2184 | } | 2210 | } |
2185 | 2211 | ||
2186 | if (!Permissions.CanLinkObject(client.AgentId, root.ParentGroup.RootPart.UUID)) | 2212 | if (!Permissions.CanLinkObject(agentId, root.ParentGroup.RootPart.UUID)) |
2187 | { | 2213 | { |
2188 | m_log.DebugFormat("[LINK]: Refusing link. No permissions on root prim"); | 2214 | m_log.DebugFormat("[LINK]: Refusing link. No permissions on root prim"); |
2189 | return; | 2215 | return; |
@@ -2199,7 +2225,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2199 | if (!owners.Contains(part.OwnerID)) | 2225 | if (!owners.Contains(part.OwnerID)) |
2200 | owners.Add(part.OwnerID); | 2226 | owners.Add(part.OwnerID); |
2201 | 2227 | ||
2202 | if (Permissions.CanLinkObject(client.AgentId, part.ParentGroup.RootPart.UUID)) | 2228 | if (Permissions.CanLinkObject(agentId, part.ParentGroup.RootPart.UUID)) |
2203 | children.Add(part); | 2229 | children.Add(part); |
2204 | } | 2230 | } |
2205 | 2231 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3347822..4c8e2d2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3272,9 +3272,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3272 | 3272 | ||
3273 | // Don't disable this log message - it's too helpful | 3273 | // Don't disable this log message - it's too helpful |
3274 | m_log.DebugFormat( | 3274 | m_log.DebugFormat( |
3275 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6}, position {7})", | 3275 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags {8}, position {9})", |
3276 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, | 3276 | RegionInfo.RegionName, (agent.child ? "child" : "root"),agent.firstname, agent.lastname, |
3277 | agent.AgentID, agent.circuitcode, teleportFlags, agent.startpos); | 3277 | agent.AgentID, agent.circuitcode, agent.IPAddress, agent.Viewer, teleportFlags, agent.startpos); |
3278 | 3278 | ||
3279 | if (LoginsDisabled) | 3279 | if (LoginsDisabled) |
3280 | { | 3280 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 7d801b5..e66678a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
359 | m_log.ErrorFormat( | 359 | m_log.ErrorFormat( |
360 | "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}", | 360 | "[SCENEGRAPH]: Tried to add scene object {0} to {1} with illegal UUID of {2}", |
361 | sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero); | 361 | sceneObject.Name, m_parentScene.RegionInfo.RegionName, UUID.Zero); |
362 | 362 | ||
363 | return false; | 363 | return false; |
364 | } | 364 | } |
365 | 365 | ||
@@ -368,12 +368,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
368 | // m_log.DebugFormat( | 368 | // m_log.DebugFormat( |
369 | // "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", | 369 | // "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", |
370 | // m_parentScene.RegionInfo.RegionName, sceneObject.UUID); | 370 | // m_parentScene.RegionInfo.RegionName, sceneObject.UUID); |
371 | 371 | ||
372 | return false; | 372 | return false; |
373 | } | 373 | } |
374 | 374 | ||
375 | // m_log.DebugFormat( | 375 | // m_log.DebugFormat( |
376 | // "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}", | 376 | // "[SCENEGRAPH]: Adding scene object {0} {1}, with {2} parts on {3}", |
377 | // sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName); | 377 | // sceneObject.Name, sceneObject.UUID, sceneObject.Parts.Length, m_parentScene.RegionInfo.RegionName); |
378 | 378 | ||
379 | SceneObjectPart[] parts = sceneObject.Parts; | 379 | SceneObjectPart[] parts = sceneObject.Parts; |
@@ -409,7 +409,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
409 | 409 | ||
410 | lock (SceneObjectGroupsByFullID) | 410 | lock (SceneObjectGroupsByFullID) |
411 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; | 411 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; |
412 | 412 | ||
413 | lock (SceneObjectGroupsByFullPartID) | 413 | lock (SceneObjectGroupsByFullPartID) |
414 | { | 414 | { |
415 | foreach (SceneObjectPart part in parts) | 415 | foreach (SceneObjectPart part in parts) |
@@ -1662,6 +1662,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1662 | { | 1662 | { |
1663 | SceneObjectGroup child = children[i].ParentGroup; | 1663 | SceneObjectGroup child = children[i].ParentGroup; |
1664 | 1664 | ||
1665 | // Don't try and add a group to itself - this will only cause severe problems later on. | ||
1666 | if (child == parentGroup) | ||
1667 | continue; | ||
1668 | |||
1665 | // Make sure no child prim is set for sale | 1669 | // Make sure no child prim is set for sale |
1666 | // So that, on delink, no prims are unwittingly | 1670 | // So that, on delink, no prims are unwittingly |
1667 | // left for sale and sold off | 1671 | // left for sale and sold off |
@@ -1684,11 +1688,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1684 | 1688 | ||
1685 | // We need to explicitly resend the newly link prim's object properties since no other actions | 1689 | // We need to explicitly resend the newly link prim's object properties since no other actions |
1686 | // occur on link to invoke this elsewhere (such as object selection) | 1690 | // occur on link to invoke this elsewhere (such as object selection) |
1687 | parentGroup.RootPart.CreateSelected = true; | 1691 | if (childGroups.Count > 0) |
1688 | parentGroup.TriggerScriptChangedEvent(Changed.LINK); | 1692 | { |
1689 | parentGroup.HasGroupChanged = true; | 1693 | parentGroup.RootPart.CreateSelected = true; |
1690 | parentGroup.ScheduleGroupForFullUpdate(); | 1694 | parentGroup.TriggerScriptChangedEvent(Changed.LINK); |
1691 | 1695 | parentGroup.HasGroupChanged = true; | |
1696 | parentGroup.ScheduleGroupForFullUpdate(); | ||
1697 | } | ||
1692 | } | 1698 | } |
1693 | finally | 1699 | finally |
1694 | { | 1700 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index f173c95..a73d9b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -265,6 +265,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
265 | 265 | ||
266 | public void ApplyNextOwnerPermissions() | 266 | public void ApplyNextOwnerPermissions() |
267 | { | 267 | { |
268 | // m_log.DebugFormat("[PRIM INVENTORY]: Applying next owner permissions to {0} {1}", Name, UUID); | ||
269 | |||
268 | SceneObjectPart[] parts = m_parts.GetArray(); | 270 | SceneObjectPart[] parts = m_parts.GetArray(); |
269 | for (int i = 0; i < parts.Length; i++) | 271 | for (int i = 0; i < parts.Length; i++) |
270 | parts[i].ApplyNextOwnerPermissions(); | 272 | parts[i].ApplyNextOwnerPermissions(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 8939342..5b838f8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -567,7 +567,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
567 | 567 | ||
568 | // ~SceneObjectGroup() | 568 | // ~SceneObjectGroup() |
569 | // { | 569 | // { |
570 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Destructor called for {0}, local id {1}", Name, LocalId); | 570 | // //m_log.DebugFormat("[SCENE OBJECT GROUP]: Destructor called for {0}, local id {1}", Name, LocalId); |
571 | // Console.WriteLine("Destructor called for {0}, local id {1}", Name, LocalId); | ||
571 | // } | 572 | // } |
572 | 573 | ||
573 | #region Constructors | 574 | #region Constructors |
@@ -1960,6 +1961,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1960 | // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", | 1961 | // "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", |
1961 | // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); | 1962 | // objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); |
1962 | 1963 | ||
1964 | // Linking to ourselves is not a valid operation. | ||
1965 | if (objectGroup == this) | ||
1966 | return; | ||
1967 | |||
1963 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 1968 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
1964 | 1969 | ||
1965 | Vector3 oldGroupPosition = linkPart.GroupPosition; | 1970 | Vector3 oldGroupPosition = linkPart.GroupPosition; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0e899ca..b130bf7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -303,6 +303,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
303 | 303 | ||
304 | // ~SceneObjectPart() | 304 | // ~SceneObjectPart() |
305 | // { | 305 | // { |
306 | // Console.WriteLine( | ||
307 | // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", | ||
308 | // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); | ||
306 | // m_log.DebugFormat( | 309 | // m_log.DebugFormat( |
307 | // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", | 310 | // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", |
308 | // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); | 311 | // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); |
@@ -1501,7 +1504,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1501 | PhysActor = null; | 1504 | PhysActor = null; |
1502 | } | 1505 | } |
1503 | 1506 | ||
1504 | // Basic Physics returns null.. joy joy joy. | 1507 | // Basic Physics can also return null as well as an exception catch. |
1505 | if (PhysActor != null) | 1508 | if (PhysActor != null) |
1506 | { | 1509 | { |
1507 | PhysActor.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info | 1510 | PhysActor.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info |
@@ -1509,10 +1512,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1509 | DoPhysicsPropertyUpdate(RigidBody, true); | 1512 | DoPhysicsPropertyUpdate(RigidBody, true); |
1510 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); | 1513 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); |
1511 | } | 1514 | } |
1512 | else | ||
1513 | { | ||
1514 | m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); | ||
1515 | } | ||
1516 | } | 1515 | } |
1517 | } | 1516 | } |
1518 | } | 1517 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0c36dcd..f2d1915 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -267,10 +267,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
267 | /// <returns></returns> | 267 | /// <returns></returns> |
268 | public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) | 268 | public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource) |
269 | { | 269 | { |
270 | // m_log.InfoFormat( | 270 | // m_log.DebugFormat("[PRIM INVENTORY]: Starting script {0} {1} in prim {2} {3} in {4}", |
271 | // "[PRIM INVENTORY]: " + | 271 | // item.Name, item.ItemID, m_part.Name, m_part.UUID, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
272 | // "Starting script {0}, {1} in prim {2}, {3}", | ||
273 | // item.Name, item.ItemID, Name, UUID); | ||
274 | 272 | ||
275 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) | 273 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) |
276 | return; | 274 | return; |
@@ -299,8 +297,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
299 | if (null == asset) | 297 | if (null == asset) |
300 | { | 298 | { |
301 | m_log.ErrorFormat( | 299 | m_log.ErrorFormat( |
302 | "[PRIM INVENTORY]: " + | 300 | "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", |
303 | "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", | ||
304 | item.Name, item.ItemID, m_part.AbsolutePosition, | 301 | item.Name, item.ItemID, m_part.AbsolutePosition, |
305 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); | 302 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); |
306 | } | 303 | } |
@@ -400,8 +397,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
400 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); | 397 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); |
401 | else | 398 | else |
402 | m_log.ErrorFormat( | 399 | m_log.ErrorFormat( |
403 | "[PRIM INVENTORY]: " + | 400 | "[PRIM INVENTORY]: Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", |
404 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", | ||
405 | itemId, m_part.Name, m_part.UUID, | 401 | itemId, m_part.Name, m_part.UUID, |
406 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); | 402 | m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); |
407 | } | 403 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5c56150..77f7b32 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -291,13 +291,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
291 | /// </summary> | 291 | /// </summary> |
292 | public PhysicsActor PhysicsActor { get; private set; } | 292 | public PhysicsActor PhysicsActor { get; private set; } |
293 | 293 | ||
294 | private byte m_movementflag; | 294 | /// <summary> |
295 | 295 | /// Record user movement inputs. | |
296 | public byte MovementFlag | 296 | /// </summary> |
297 | { | 297 | public byte MovementFlag { get; private set; } |
298 | set { m_movementflag = value; } | ||
299 | get { return m_movementflag; } | ||
300 | } | ||
301 | 298 | ||
302 | private bool m_updateflag; | 299 | private bool m_updateflag; |
303 | 300 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index ab02f92..0a32214 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1470,7 +1470,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1470 | m_SOPXmlProcessors, | 1470 | m_SOPXmlProcessors, |
1471 | reader, | 1471 | reader, |
1472 | (o, nodeName, e) | 1472 | (o, nodeName, e) |
1473 | => m_log.ErrorFormat( | 1473 | => m_log.DebugFormat( |
1474 | "[SceneObjectSerializer]: Exception while parsing {0} in object {1} {2}: {3}{4}", | 1474 | "[SceneObjectSerializer]: Exception while parsing {0} in object {1} {2}: {3}{4}", |
1475 | ((SceneObjectPart)o).Name, ((SceneObjectPart)o).UUID, nodeName, e.Message, e.StackTrace)); | 1475 | ((SceneObjectPart)o).Name, ((SceneObjectPart)o).UUID, nodeName, e.Message, e.StackTrace)); |
1476 | 1476 | ||
@@ -1535,14 +1535,18 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1535 | 1535 | ||
1536 | reader.ReadStartElement(name, String.Empty); // Shape | 1536 | reader.ReadStartElement(name, String.Empty); // Shape |
1537 | 1537 | ||
1538 | ExternalRepresentationUtils.ExecuteReadProcessors( | 1538 | errors = ExternalRepresentationUtils.ExecuteReadProcessors( |
1539 | shape, | 1539 | shape, |
1540 | m_ShapeXmlProcessors, | 1540 | m_ShapeXmlProcessors, |
1541 | reader, | 1541 | reader, |
1542 | (o, nodeName, e) | 1542 | (o, nodeName, e) |
1543 | => m_log.ErrorFormat( | 1543 | => |
1544 | "[SceneObjectSerializer]: Exception while parsing Shape property {0}: {1}{2}", | 1544 | { |
1545 | nodeName, e.Message, e.StackTrace)); | 1545 | m_log.DebugFormat( |
1546 | "[SceneObjectSerializer]: Exception while parsing Shape property {0}: {1}{2}", | ||
1547 | nodeName, e.Message, e.StackTrace); | ||
1548 | } | ||
1549 | ); | ||
1546 | 1550 | ||
1547 | reader.ReadEndElement(); // Shape | 1551 | reader.ReadEndElement(); // Shape |
1548 | 1552 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 80f198d..7737d8e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Threading; | ||
30 | using NUnit.Framework; | 31 | using NUnit.Framework; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -43,6 +44,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
43 | [TestFixture] | 44 | [TestFixture] |
44 | public class SceneObjectBasicTests | 45 | public class SceneObjectBasicTests |
45 | { | 46 | { |
47 | // [TearDown] | ||
48 | // public void TearDown() | ||
49 | // { | ||
50 | // Console.WriteLine("TearDown"); | ||
51 | // GC.Collect(); | ||
52 | // Thread.Sleep(3000); | ||
53 | // } | ||
54 | |||
55 | // public class GcNotify | ||
56 | // { | ||
57 | // public static AutoResetEvent gcEvent = new AutoResetEvent(false); | ||
58 | // private static bool _initialized = false; | ||
59 | // | ||
60 | // public static void Initialize() | ||
61 | // { | ||
62 | // if (!_initialized) | ||
63 | // { | ||
64 | // _initialized = true; | ||
65 | // new GcNotify(); | ||
66 | // } | ||
67 | // } | ||
68 | // | ||
69 | // private GcNotify(){} | ||
70 | // | ||
71 | // ~GcNotify() | ||
72 | // { | ||
73 | // if (!Environment.HasShutdownStarted && | ||
74 | // !AppDomain.CurrentDomain.IsFinalizingForUnload()) | ||
75 | // { | ||
76 | // Console.WriteLine("GcNotify called"); | ||
77 | // gcEvent.Set(); | ||
78 | // new GcNotify(); | ||
79 | // } | ||
80 | // } | ||
81 | // } | ||
82 | |||
46 | /// <summary> | 83 | /// <summary> |
47 | /// Test adding an object to a scene. | 84 | /// Test adding an object to a scene. |
48 | /// </summary> | 85 | /// </summary> |
@@ -147,11 +184,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
147 | public void TestDeleteSceneObject() | 184 | public void TestDeleteSceneObject() |
148 | { | 185 | { |
149 | TestHelpers.InMethod(); | 186 | TestHelpers.InMethod(); |
150 | 187 | ||
151 | TestScene scene = SceneHelpers.SetupScene(); | 188 | TestScene scene = SceneHelpers.SetupScene(); |
152 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); | 189 | SceneObjectPart part = SceneHelpers.AddSceneObject(scene); |
153 | scene.DeleteSceneObject(part.ParentGroup, false); | 190 | scene.DeleteSceneObject(part.ParentGroup, false); |
154 | 191 | ||
155 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 192 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
156 | Assert.That(retrievedPart, Is.Null); | 193 | Assert.That(retrievedPart, Is.Null); |
157 | } | 194 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index a2332bb..be5b4a8 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -39,14 +39,31 @@ using log4net; | |||
39 | 39 | ||
40 | namespace OpenSim.Region.Framework.Scenes.Tests | 40 | namespace OpenSim.Region.Framework.Scenes.Tests |
41 | { | 41 | { |
42 | /// <summary> | ||
43 | /// Linking tests | ||
44 | /// </summary> | ||
45 | [TestFixture] | 42 | [TestFixture] |
46 | public class SceneObjectLinkingTests | 43 | public class SceneObjectLinkingTests |
47 | { | 44 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 46 | ||
47 | /// <summary> | ||
48 | /// Links to self should be ignored. | ||
49 | /// </summary> | ||
50 | [Test] | ||
51 | public void TestLinkToSelf() | ||
52 | { | ||
53 | TestHelpers.InMethod(); | ||
54 | |||
55 | UUID ownerId = TestHelpers.ParseTail(0x1); | ||
56 | int nParts = 3; | ||
57 | |||
58 | TestScene scene = SceneHelpers.SetupScene(); | ||
59 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(nParts, ownerId, "TestLinkToSelf_", 0x10); | ||
60 | scene.AddSceneObject(sog1); | ||
61 | scene.LinkObjects(ownerId, sog1.LocalId, new List<uint>() { sog1.Parts[1].LocalId }); | ||
62 | // sog1.LinkToGroup(sog1); | ||
63 | |||
64 | Assert.That(sog1.Parts.Length, Is.EqualTo(nParts)); | ||
65 | } | ||
66 | |||
50 | [Test] | 67 | [Test] |
51 | public void TestLinkDelink2SceneObjects() | 68 | public void TestLinkDelink2SceneObjects() |
52 | { | 69 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index 1abef8d..e4b607d 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -53,6 +53,30 @@ namespace OpenSim.Region.Framework.Tests | |||
53 | public class TaskInventoryTests | 53 | public class TaskInventoryTests |
54 | { | 54 | { |
55 | [Test] | 55 | [Test] |
56 | public void TestAddTaskInventoryItem() | ||
57 | { | ||
58 | TestHelpers.InMethod(); | ||
59 | // log4net.Config.XmlConfigurator.Configure(); | ||
60 | |||
61 | Scene scene = SceneHelpers.SetupScene(); | ||
62 | UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); | ||
63 | SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); | ||
64 | SceneObjectPart sop1 = sog1.RootPart; | ||
65 | |||
66 | // Create an object embedded inside the first | ||
67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | ||
68 | TaskInventoryItem taskSceneObjectItem | ||
69 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); | ||
70 | |||
71 | TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); | ||
72 | Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); | ||
73 | Assert.That(addedItem.OwnerID, Is.EqualTo(user1.PrincipalID)); | ||
74 | Assert.That(addedItem.ParentID, Is.EqualTo(sop1.UUID)); | ||
75 | Assert.That(addedItem.InvType, Is.EqualTo((int)InventoryType.Object)); | ||
76 | Assert.That(addedItem.Type, Is.EqualTo((int)AssetType.Object)); | ||
77 | } | ||
78 | |||
79 | [Test] | ||
56 | public void TestRezObjectFromInventoryItem() | 80 | public void TestRezObjectFromInventoryItem() |
57 | { | 81 | { |
58 | TestHelpers.InMethod(); | 82 | TestHelpers.InMethod(); |
@@ -66,7 +90,7 @@ namespace OpenSim.Region.Framework.Tests | |||
66 | // Create an object embedded inside the first | 90 | // Create an object embedded inside the first |
67 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); | 91 | UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); |
68 | TaskInventoryItem taskSceneObjectItem | 92 | TaskInventoryItem taskSceneObjectItem |
69 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId); | 93 | = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID); |
70 | 94 | ||
71 | scene.AddSceneObject(sog1); | 95 | scene.AddSceneObject(sog1); |
72 | 96 | ||