* 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
0.6.3-post-fixes
Teravus Ovares 2009-02-08 18:05:12 +00:00
parent c0c330988f
commit d85fce99f4
1 changed files with 23 additions and 1 deletions

View File

@ -1018,11 +1018,26 @@ namespace OpenSim.Region.Framework.Scenes
// justincc: I don't believe this hack is needed any longer, especially since the physics // 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 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false
// this method was preventing proper reload of scene objects. // 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 // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects
// at region startup // 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() public void ResetChildPrimPhysicsPositions()
{ {
AbsolutePosition = AbsolutePosition; // could someone in the know please explain how this works? 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) public UUID GetPartsFullID(uint localID)
@ -2060,6 +2075,13 @@ namespace OpenSim.Region.Framework.Scenes
// objectGroup.m_rootPart = null; // 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; HasGroupChanged = true;
ScheduleGroupForFullUpdate(); ScheduleGroupForFullUpdate();
} }