From d85fce99f4b524598997a73caff6542a5709787a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 8 Feb 2009 18:05:12 +0000 Subject: * Once again, fixing linked prim collisions by putting AbsolutePosition = AbsolutePosition; back in the linking routine. Why was it removed? It's critical to the physics scene. * Fixes mantis #3108 --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 57d9ce4..ba2b55e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1018,11 +1018,26 @@ namespace OpenSim.Region.Framework.Scenes // justincc: I don't believe this hack is needed any longer, especially since the physics // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false // this method was preventing proper reload of scene objects. + // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects // at region startup + + // teravus: After this was removed from the linking algorithm, Linked prims no longer collided + // properly when non-physical if they havn't been moved. This breaks ALL builds. + // see: http://opensimulator.org/mantis/view.php?id=3108 + + // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the + // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and + // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute + // Position has been set! + public void ResetChildPrimPhysicsPositions() { AbsolutePosition = AbsolutePosition; // could someone in the know please explain how this works? + + // teravus: AbsolutePosition is NOT a normal property! + // the code in the getter of AbsolutePosition is significantly different then the code in the setter! + } public UUID GetPartsFullID(uint localID) @@ -2059,7 +2074,14 @@ namespace OpenSim.Region.Framework.Scenes // Can't do this yet since backup still makes use of the root part without any synchronization // objectGroup.m_rootPart = null; - AttachToBackup(); + AttachToBackup(); + + + // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the + // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and + // unmoved prims! + ResetChildPrimPhysicsPositions(); + HasGroupChanged = true; ScheduleGroupForFullUpdate(); } -- cgit v1.1