diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 29a9e149de..acae4b12fa 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -142,6 +142,7 @@ namespace OpenSim.Framework.Communications.Cache if (userProfile != null) { + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) @@ -177,6 +178,7 @@ namespace OpenSim.Framework.Communications.Cache UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(userID); if (userProfile != null) { + if ((userProfile.UserAssetURI == null || userProfile.UserAssetURI == "") && m_commsManager.NetworkServersInfo != null) userProfile.UserAssetURI = m_commsManager.NetworkServersInfo.AssetURL; if ((userProfile.UserInventoryURI == null || userProfile.UserInventoryURI == "") && m_commsManager.NetworkServersInfo != null) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index f073f32ee7..1fdf1ef50a 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)) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f74fd5d93f..b0fb8b3e44 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -542,6 +542,18 @@ namespace OpenSim.Region.Framework.Scenes if (group.GetFromItemID() == itemID) { m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); + bool hasScripts = false; + foreach (SceneObjectPart part in group.Children.Values) + { + if (part.Inventory.ContainsScripts()) + { + hasScripts = true; + break; + } + } + + if (hasScripts) // Allow the object to execute the attach(NULL_KEY) event + System.Threading.Thread.Sleep(100); group.DetachToInventoryPrep(); m_log.Debug("[DETACH]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString()); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index eacd21977d..f8498c68ee 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1853,7 +1853,7 @@ namespace OpenSim.Region.Framework.Scenes } } } - + public void rotLookAt(Quaternion target, float strength, float damping) { SceneObjectPart rootpart = m_rootPart; @@ -1880,6 +1880,7 @@ namespace OpenSim.Region.Framework.Scenes } } } + public void stopLookAt() { SceneObjectPart rootpart = m_rootPart; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0eddbfde0b..6b562e5163 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes ParentGroup.HasGroupChanged = true; ScheduleFullUpdate(); } - + /// /// Set the text displayed for this part. /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0321c4115d..cdd23bd98d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -345,6 +345,7 @@ namespace OpenSim.Region.Framework.Scenes break; } } + m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs index 98681d6569..88f5d3e171 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs @@ -620,11 +620,25 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin set { return; } } - public override Quaternion APIDTarget { set { return; } } - public override bool APIDActive { set { return; } } - public override float APIDStrength { set { return; } } - public override float APIDDamping { set { return; } } + public override Quaternion APIDTarget + { + set { return; } + } + public override bool APIDActive + { + set { return; } + } + + public override float APIDStrength + { + set { return; } + } + + public override float APIDDamping + { + set { return; } + } /// /// Adds the force supplied to the Target Velocity diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs index d931f12636..9603ea4571 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs @@ -570,7 +570,6 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin public override float APIDStrength { set { return; } } public override float APIDDamping { set { return; } } - public override void AddForce(Vector3 force, bool pushforce) { m_forcelist.Add(force); diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index b82586f8f4..10b153d25e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -487,7 +487,6 @@ namespace OpenSim.Region.Physics.Manager public override float APIDStrength { set { return; } } public override float APIDDamping { set { return; } } - public override void SetMomentum(Vector3 momentum) { } diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 06ed8fb20d..a38fcccd53 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -1205,7 +1205,6 @@ namespace OpenSim.Region.Physics.OdePlugin public override float APIDDamping{ set { return; } } - public override void SubscribeEvents(int ms) { m_requestedUpdateFrequency = ms; diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 3eb3b280e1..dd7902a7b7 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2822,7 +2822,7 @@ Console.WriteLine(" JointCreateFixed"); } public override bool PIDActive { set { m_usePID = value; } } public override float PIDTau { set { m_PIDTau = value; } } - + public override float PIDHoverHeight { set { m_PIDHoverHeight = value; ; } } public override bool PIDHoverActive { set { m_useHoverPID = value; } } public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs index 847b634e9b..edccf479c1 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs @@ -299,6 +299,7 @@ namespace OpenSim.Region.Physics.POSPlugin { set { return; } } + public override Quaternion APIDTarget { set { return; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2da498a15e..28932b6b0f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2742,7 +2742,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } - public void llStopLookAt() { m_host.AddScriptLPS(1); @@ -5866,7 +5865,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 @@ -7467,9 +7466,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: @@ -7487,6 +7494,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: @@ -7497,7 +7506,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: @@ -7532,7 +7541,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)); @@ -7541,8 +7550,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)); diff --git a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs index 968a6d6da3..7098b07ee8 100644 --- a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs @@ -151,6 +151,9 @@ namespace OpenSim.Services.Connectors.Grid m_AssetService.Store(ass); + // finally + info.TerrainImage = ass.FullID; + } catch // LEGIT: Catching problems caused by OpenJPEG p/invoke {