From 68187f7245a113e0afab0bfc28820bb0be5387b5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 21 Dec 2009 07:44:17 -0800 Subject: Bug fix: in standalone, HGInventoryBroker needs to get the local inventory server URL from NetworkServersInfo. --- .../ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') 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 private ISessionAuthInventoryService m_HGService; private string m_LocalGridInventoryURI = string.Empty; + + private string LocalGridInventory + { + get + { + if (m_LocalGridInventoryURI == null || m_LocalGridInventoryURI == "") + m_LocalGridInventoryURI = m_Scene.CommsManager.NetworkServersInfo.InventoryURL; + return m_LocalGridInventoryURI; + } + } + public Type ReplaceableInterface { get { return null; } @@ -533,7 +544,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory string userInventoryServerURI = Util.ServerURI(uinfo.UserProfile.UserInventoryURI); - string uri = m_LocalGridInventoryURI.TrimEnd('/'); + string uri = LocalGridInventory.TrimEnd('/'); if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) { @@ -545,7 +556,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory private string GetUserInventoryURI(UUID userID) { - string invURI = m_LocalGridInventoryURI; + string invURI = LocalGridInventory; CachedUserInfo uinfo = m_UserProfileService.GetUserDetails(userID); if ((uinfo == null) || (uinfo.UserProfile == null)) -- cgit v1.1 From d04f6688e42f340f0dedec2c4982cf2fd4cf1686 Mon Sep 17 00:00:00 2001 From: Jeff Lee Date: Sat, 19 Dec 2009 18:25:45 -0500 Subject: Fixes some incorrect values returned by llGetPrimitiveParams() and osGetLinkPrimitiveParams(). Signed-off-by: Melanie --- .../Shared/Api/Implementation/LSL_Api.cs | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7f71d09..79b2391 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5801,7 +5801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); return World.SimulatorFPS; } - + /* particle system rules should be coming into this routine as doubles, that is rule[0] should be an integer from this list and rule[1] should be the arg @@ -7401,9 +7401,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_POSITION: - res.Add(new LSL_Vector(part.AbsolutePosition.X, + LSL_Vector v = new LSL_Vector(part.AbsolutePosition.X, part.AbsolutePosition.Y, - part.AbsolutePosition.Z)); + part.AbsolutePosition.Z); + // For some reason, the part.AbsolutePosition.* values do not change if the + // linkset is rotated; they always reflect the child prim's world position + // as though the linkset is unrotated. This is incompatible behavior with SL's + // implementation, so will break scripts imported from there (not to mention it + // makes it more difficult to determine a child prim's actual inworld position). + if (part.ParentID != 0) + v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); + res.Add( v ); break; case (int)ScriptBaseClass.PRIM_SIZE: @@ -7421,6 +7429,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api PrimitiveBaseShape Shape = part.Shape; int primType = getScriptPrimType(part.Shape); res.Add(new LSL_Integer(primType)); + double topshearx = (double)(sbyte)Shape.PathShearX / 100.0; // Fix negative values for PathShearX + double topsheary = (double)(sbyte)Shape.PathShearY / 100.0; // and PathShearY. switch (primType) { case ScriptBaseClass.PRIM_TYPE_BOX: @@ -7431,7 +7441,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0)); res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); - res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); + res.Add(new LSL_Vector(topshearx, topsheary, 0)); break; case ScriptBaseClass.PRIM_TYPE_SPHERE: @@ -7466,7 +7476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); // vector topshear - res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); + res.Add(new LSL_Vector(topshearx, topsheary, 0)); // vector profilecut res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); @@ -7475,8 +7485,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); // float revolutions - res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :( - + res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned + // byte is being used to represent the entire + // range of floating-point values from 1.0 + // through 4.0 (which is how SL does it). + // float radiusoffset res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0)); -- cgit v1.1 From 32904c0ce82093d56782caf0cd79f439048696e2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 21 Dec 2009 22:05:43 +0000 Subject: When a script has been loaded, remove it's state entry, so recompiling doesn't pick up the old state again. --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 47e4ad0..b98747a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -333,6 +333,7 @@ namespace OpenSim.Region.Framework.Scenes break; } } + m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } -- cgit v1.1