From 68187f7245a113e0afab0bfc28820bb0be5387b5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 21 Dec 2009 07:44:17 -0800 Subject: [PATCH 1/8] Bug fix: in standalone, HGInventoryBroker needs to get the local inventory server URL from NetworkServersInfo. --- .../Cache/UserProfileCacheService.cs | 2 ++ .../Inventory/HGInventoryBroker.cs | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) 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)) From d04f6688e42f340f0dedec2c4982cf2fd4cf1686 Mon Sep 17 00:00:00 2001 From: Jeff Lee Date: Sat, 19 Dec 2009 18:25:45 -0500 Subject: [PATCH 2/8] 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(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7f71d09178..79b2391af6 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)); From 4a33ee9fb9c59ec77f614bde53bec10232485aaa Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 21 Dec 2009 08:55:12 -0800 Subject: [PATCH 3/8] Bug fix: set the map image upon hyperlinking regions. --- OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs | 3 +++ 1 file changed, 3 insertions(+) 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 { From 32904c0ce82093d56782caf0cd79f439048696e2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 21 Dec 2009 22:05:43 +0000 Subject: [PATCH 4/8] 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(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 47e4ad031c..b98747a6b0 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); } } From e530180c1e8e9758df7cb9a72ad0715fd7c8a0e7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 22 Dec 2009 00:26:12 +0000 Subject: [PATCH 5/8] Glue code for a couple of new LSL function implementations --- .../Framework/Scenes/SceneObjectGroup.cs | 39 ++++++++++++++++ .../Framework/Scenes/SceneObjectPart.cs | 12 +++++ .../BasicPhysicsPlugin/BasicPhysicsActor.cs | 20 +++++++++ .../BulletDotNETCharacter.cs | 21 +++++++++ .../BulletDotNETPlugin/BulletDotNETPrim.cs | 6 ++- .../Physics/BulletXPlugin/BulletXPlugin.cs | 20 +++++++++ .../Region/Physics/Manager/PhysicsActor.cs | 14 +++++- .../Region/Physics/OdePlugin/ODECharacter.cs | 9 ++++ OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 9 ++++ .../Region/Physics/POSPlugin/POSCharacter.cs | 21 +++++++++ OpenSim/Region/Physics/POSPlugin/POSPrim.cs | 21 +++++++++ .../Region/Physics/PhysXPlugin/PhysXPlugin.cs | 44 +++++++++++++++++++ .../Shared/Api/Implementation/LSL_Api.cs | 6 ++- 13 files changed, 237 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index cb87212672..e9ed066a13 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1734,6 +1734,45 @@ namespace OpenSim.Region.Framework.Scenes } } } + + public void rotLookAt(Quaternion target, float strength, float damping) + { + SceneObjectPart rootpart = m_rootPart; + if (rootpart != null) + { + if (IsAttachment) + { + /* + ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); + if (avatar != null) + { + Rotate the Av? + } */ + } + else + { + if (rootpart.PhysActor != null) + { + rootpart.PhysActor.APIDTarget = new Quaternion(target.X, target.Y, target.Z, target.W); + rootpart.PhysActor.APIDStrength = strength; + rootpart.PhysActor.APIDDamping = damping; + rootpart.PhysActor.APIDActive = true; + } + } + } + } + public void stopLookAt() + { + SceneObjectPart rootpart = m_rootPart; + if (rootpart != null) + { + if (rootpart.PhysActor != null) + { + rootpart.PhysActor.APIDActive = false; + } + } + + } /// /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b6916f227d..c0243a5b61 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2185,6 +2185,11 @@ namespace OpenSim.Region.Framework.Scenes ParentGroup.HasGroupChanged = true; ScheduleFullUpdate(); } + + public void RotLookAt(Quaternion target, float strength, float damping) + { + m_parentGroup.rotLookAt(target, strength, damping); + } /// /// Schedules this prim for a full update @@ -2668,7 +2673,14 @@ namespace OpenSim.Region.Framework.Scenes ParentGroup.HasGroupChanged = true; ScheduleFullUpdate(); } + + public void StopLookAt() + { + m_parentGroup.stopLookAt(); + m_parentGroup.ScheduleGroupForTerseUpdate(); + } + /// /// Set the text displayed for this part. /// diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 8df997eb40..f411dd7a93 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -303,6 +303,26 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin 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 void SubscribeEvents(int ms) { } diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs index 5ed3b144ac..02328b5918 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETCharacter.cs @@ -620,6 +620,27 @@ 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; } + } + /// /// Adds the force supplied to the Target Velocity /// The PID controller takes this target velocity and tries to make it a reality diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs index 5b542db867..9603ea4571 100644 --- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs +++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs @@ -565,7 +565,11 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } public override float PIDHoverTau { set { m_PIDHoverTau = value; } } - + 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 void AddForce(Vector3 force, bool pushforce) { m_forcelist.Add(force); diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 1e94ee2d82..d5d146e11a 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -1238,6 +1238,26 @@ namespace OpenSim.Region.Physics.BulletXPlugin public override PIDHoverType PIDHoverType { set { return; } } public override float PIDHoverTau { set { return; } } + public override OpenMetaverse.Quaternion APIDTarget + { + set { return; } + } + + public override bool APIDActive + { + set { return; } + } + + public override float APIDStrength + { + set { return; } + } + + public override float APIDDamping + { + set { return; } + } + public override void SubscribeEvents(int ms) { diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index f58129d241..10b153d25e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -243,7 +243,12 @@ namespace OpenSim.Region.Physics.Manager public abstract PIDHoverType PIDHoverType { set;} public abstract float PIDHoverTau { set;} - + // For RotLookAt + public abstract Quaternion APIDTarget { set;} + public abstract bool APIDActive { set;} + public abstract float APIDStrength { set;} + public abstract float APIDDamping { set;} + public abstract void AddForce(Vector3 force, bool pushforce); public abstract void AddAngularForce(Vector3 force, bool pushforce); public abstract void SetMomentum(Vector3 momentum); @@ -476,7 +481,12 @@ namespace OpenSim.Region.Physics.Manager public override bool PIDHoverActive { set { return; } } public override PIDHoverType PIDHoverType { set { return; } } public override float PIDHoverTau { 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 void SetMomentum(Vector3 momentum) { } diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 40fbde1d24..06ed8fb20d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -1196,6 +1196,15 @@ namespace OpenSim.Region.Physics.OdePlugin public override bool PIDHoverActive { set { return; } } public override PIDHoverType PIDHoverType { set { return; } } public override float PIDHoverTau { 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 void SubscribeEvents(int ms) { diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index d24157473c..3eb3b280e1 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2827,6 +2827,15 @@ Console.WriteLine(" JointCreateFixed"); public override bool PIDHoverActive { set { m_useHoverPID = value; } } public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } public override float PIDHoverTau { set { m_PIDHoverTau = value; } } + + public override Quaternion APIDTarget{ set { return; } } + + public override bool APIDActive{ set { return; } } + + public override float APIDStrength{ set { return; } } + + public override float APIDDamping{ set { return; } } + private void createAMotor(Vector3 axis) { diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs index 26cd1dd2c2..566b4e7313 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs @@ -304,6 +304,27 @@ namespace OpenSim.Region.Physics.POSPlugin { 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 void SubscribeEvents(int ms) { diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs index 96c3e2616c..7447f76e1d 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs @@ -299,6 +299,27 @@ namespace OpenSim.Region.Physics.POSPlugin { 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 void SubscribeEvents(int ms) { diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 8bdb18d006..24eb6b1d20 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -498,6 +498,28 @@ namespace OpenSim.Region.Physics.PhysXPlugin public override bool PIDHoverActive { set { return; } } public override PIDHoverType PIDHoverType { set { return; } } public override float PIDHoverTau { 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 void SubscribeEvents(int ms) { @@ -780,6 +802,28 @@ namespace OpenSim.Region.Physics.PhysXPlugin public override bool PIDHoverActive { set { return; } } public override PIDHoverType PIDHoverType { set { return; } } public override float PIDHoverTau { 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 void SubscribeEvents(int ms) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 79b2391af6..cf3a1a04a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2724,7 +2724,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopLookAt() { m_host.AddScriptLPS(1); - NotImplemented("llStopLookAt"); +// NotImplemented("llStopLookAt"); + m_host.StopLookAt(); } public void llSetTimerEvent(double sec) @@ -3071,7 +3072,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRotLookAt(LSL_Rotation target, double strength, double damping) { m_host.AddScriptLPS(1); - NotImplemented("llRotLookAt"); +// NotImplemented("llRotLookAt"); + m_host.RotLookAt(Rot2Quaternion(target), (float)strength, (float)damping); } public LSL_Integer llStringLength(string str) From 69b551c51686bca58c478f517f6ccfa561ad9730 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Dec 2009 03:22:33 +0100 Subject: [PATCH 6/8] Allow 100ms for scripts to run attach(NULL_KEY) on detach --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f74fd5d93f..e875525af9 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) + { + 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()); From 46fea747265574bb056b8d1ffa189ec3725a7abc Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Dec 2009 03:25:09 +0100 Subject: [PATCH 7/8] Jumped the gun... --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e875525af9..fadeaf4921 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -545,7 +545,7 @@ namespace OpenSim.Region.Framework.Scenes bool hasScripts = false; foreach (SceneObjectPart part in group.Children) { - if (part..Inventory.ContainsScripts()) + if (part.Inventory.ContainsScripts()) { hasScripts = true; break; From 49fbe0ddb429b8625682255bf0cafa9ea93d274a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Dec 2009 03:26:47 +0100 Subject: [PATCH 8/8] Should not commit without compiling --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index fadeaf4921..b0fb8b3e44 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -543,7 +543,7 @@ namespace OpenSim.Region.Framework.Scenes { m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); bool hasScripts = false; - foreach (SceneObjectPart part in group.Children) + foreach (SceneObjectPart part in group.Children.Values) { if (part.Inventory.ContainsScripts()) {