diff options
Diffstat (limited to 'OpenSim/Region')
3 files changed, 34 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index f073f32..1fdf1ef 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -56,6 +56,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
56 | private ISessionAuthInventoryService m_HGService; | 56 | private ISessionAuthInventoryService m_HGService; |
57 | 57 | ||
58 | private string m_LocalGridInventoryURI = string.Empty; | 58 | private string m_LocalGridInventoryURI = string.Empty; |
59 | |||
60 | private string LocalGridInventory | ||
61 | { | ||
62 | get | ||
63 | { | ||
64 | if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "") | ||
65 | m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL; | ||
66 | return m_LocalGridInventoryURI; | ||
67 | } | ||
68 | } | ||
69 | |||
59 | public Type ReplaceableInterface | 70 | public Type ReplaceableInterface |
60 | { | 71 | { |
61 | get { return null; } | 72 | get { return null; } |
@@ -533,7 +544,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
533 | 544 | ||
534 | string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); | 545 | string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); |
535 | 546 | ||
536 | string uri = m_LocalGridInventoryURI.TrimEnd('/'); | 547 | string uri = LocalGridInventory.TrimEnd('/'); |
537 | 548 | ||
538 | if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) | 549 | if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) |
539 | { | 550 | { |
@@ -545,7 +556,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
545 | 556 | ||
546 | private string GetUserInventoryURI(UUID userID) | 557 | private string GetUserInventoryURI(UUID userID) |
547 | { | 558 | { |
548 | string invURI = m_LocalGridInventoryURI; | 559 | string invURI = LocalGridInventory; |
549 | 560 | ||
550 | CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); | 561 | CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); |
551 | if ((uinfo == null) || (uinfo.UserProfile == null)) | 562 | if ((uinfo == null) || (uinfo.UserProfile == null)) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0321c41..cdd23bd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -345,6 +345,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
345 | break; | 345 | break; |
346 | } | 346 | } |
347 | } | 347 | } |
348 | m_part.ParentGroup.m_savedScriptState.Remove(oldID); | ||
348 | } | 349 | } |
349 | } | 350 | } |
350 | 351 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2da498a..c3edaef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5866,7 +5866,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5866 | m_host.AddScriptLPS(1); | 5866 | m_host.AddScriptLPS(1); |
5867 | return World.SimulatorFPS; | 5867 | return World.SimulatorFPS; |
5868 | } | 5868 | } |
5869 | 5869 | ||
5870 | 5870 | ||
5871 | /* particle system rules should be coming into this routine as doubles, that is | 5871 | /* particle system rules should be coming into this routine as doubles, that is |
5872 | rule[0] should be an integer from this list and rule[1] should be the arg | 5872 | rule[0] should be an integer from this list and rule[1] should be the arg |
@@ -7467,9 +7467,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7467 | break; | 7467 | break; |
7468 | 7468 | ||
7469 | case (int)ScriptBaseClass.PRIM_POSITION: | 7469 | case (int)ScriptBaseClass.PRIM_POSITION: |
7470 | res.Add(new LSL_Vector(part.AbsolutePosition.X, | 7470 | LSL_Vector v = new LSL_Vector(part.AbsolutePosition.X, |
7471 | part.AbsolutePosition.Y, | 7471 | part.AbsolutePosition.Y, |
7472 | part.AbsolutePosition.Z)); | 7472 | part.AbsolutePosition.Z); |
7473 | // For some reason, the part.AbsolutePosition.* values do not change if the | ||
7474 | // linkset is rotated; they always reflect the child prim's world position | ||
7475 | // as though the linkset is unrotated. This is incompatible behavior with SL's | ||
7476 | // implementation, so will break scripts imported from there (not to mention it | ||
7477 | // makes it more difficult to determine a child prim's actual inworld position). | ||
7478 | if (part.ParentID != 0) | ||
7479 | v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); | ||
7480 | res.Add( v ); | ||
7473 | break; | 7481 | break; |
7474 | 7482 | ||
7475 | case (int)ScriptBaseClass.PRIM_SIZE: | 7483 | case (int)ScriptBaseClass.PRIM_SIZE: |
@@ -7487,6 +7495,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7487 | PrimitiveBaseShape Shape = part.Shape; | 7495 | PrimitiveBaseShape Shape = part.Shape; |
7488 | int primType = getScriptPrimType(part.Shape); | 7496 | int primType = getScriptPrimType(part.Shape); |
7489 | res.Add(new LSL_Integer(primType)); | 7497 | res.Add(new LSL_Integer(primType)); |
7498 | double topshearx = (double)(sbyte)Shape.PathShearX / 100.0; // Fix negative values for PathShearX | ||
7499 | double topsheary = (double)(sbyte)Shape.PathShearY / 100.0; // and PathShearY. | ||
7490 | switch (primType) | 7500 | switch (primType) |
7491 | { | 7501 | { |
7492 | case ScriptBaseClass.PRIM_TYPE_BOX: | 7502 | case ScriptBaseClass.PRIM_TYPE_BOX: |
@@ -7497,7 +7507,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7497 | res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); | 7507 | res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); |
7498 | res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); | 7508 | res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); |
7499 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); | 7509 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); |
7500 | res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); | 7510 | res.Add(new LSL_Vector(topshearx, topsheary, 0)); |
7501 | break; | 7511 | break; |
7502 | 7512 | ||
7503 | case ScriptBaseClass.PRIM_TYPE_SPHERE: | 7513 | case ScriptBaseClass.PRIM_TYPE_SPHERE: |
@@ -7532,7 +7542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7532 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); | 7542 | res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); |
7533 | 7543 | ||
7534 | // vector topshear | 7544 | // vector topshear |
7535 | res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); | 7545 | res.Add(new LSL_Vector(topshearx, topsheary, 0)); |
7536 | 7546 | ||
7537 | // vector profilecut | 7547 | // vector profilecut |
7538 | res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); | 7548 | res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); |
@@ -7541,8 +7551,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7541 | res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); | 7551 | res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); |
7542 | 7552 | ||
7543 | // float revolutions | 7553 | // float revolutions |
7544 | res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :( | 7554 | res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned |
7545 | 7555 | // byte is being used to represent the entire | |
7556 | // range of floating-point values from 1.0 | ||
7557 | // through 4.0 (which is how SL does it). | ||
7558 | |||
7546 | // float radiusoffset | 7559 | // float radiusoffset |
7547 | res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); | 7560 | res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); |
7548 | 7561 | ||