From 4e45718833f72b9149aed6d503e967b8916e5d08 Mon Sep 17 00:00:00 2001 From: Mikko Pallari Date: Thu, 15 Apr 2010 08:23:51 +0300 Subject: Added overload of SendGenericMessage to LLClientView with string list as parameter. Now modules themselfs don't necessarily need to convert strings to byte arrays. Added this as it was removed in LightShare patch. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 15 +++++++++++++++ OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++++ .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ 4 files changed, 29 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9eb35fa..e67428d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -816,6 +816,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendGenericMessage(string method, List message) + { + GenericMessagePacket gmp = new GenericMessagePacket(); + gmp.MethodData.Method = Util.StringToBytes256(method); + gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; + int i = 0; + foreach (string val in message) + { + gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); + gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); + } + + OutPacket(gmp, ThrottleOutPacketType.Task); + } + public void SendGenericMessage(string method, List message) { GenericMessagePacket gmp = new GenericMessagePacket(); diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 967438f..2681d4f 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -461,6 +461,10 @@ namespace OpenSim.Region.Examples.SimpleModule } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 27de529..7453eae 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -965,6 +965,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d2279c7..146b3d6 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -551,6 +551,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { -- cgit v1.1 From e5bcd8b341c974afe3f1fbd06a537319bc7c4485 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 May 2010 23:29:37 +0100 Subject: Apply adaption of patch in http://opensimulator.org/mantis/view.php?id=4628 This prevents a ground-sitting avatar from being moved about in mouselook Thanks mirceakitsune! --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2ce1b68..ad7c3ae 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1312,8 +1312,7 @@ namespace OpenSim.Region.Framework.Scenes // Setting parent ID would fix this, if we knew what value // to use. Or we could add a m_isSitting variable. //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); - SitGround = true; - + SitGround = true; } // In the future, these values might need to go global. @@ -1330,7 +1329,7 @@ namespace OpenSim.Region.Framework.Scenes bool update_movementflag = false; - if (m_allowMovement) + if (m_allowMovement && !SitGround) { if (agentData.UseClientAgentPosition) { -- cgit v1.1 From 074937e0e510e9be6b7a0e5639d93a93be38d6b1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 May 2010 23:34:47 +0100 Subject: Apply http://opensimulator.org/mantis/view.php?id=4627 Adds OwnerId and CreatorId properties to MRM.IObject --- .../OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs | 10 ++++++++++ .../Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | 10 ++++++++++ 2 files changed, 20 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index 30580e7..29f7f68 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -98,6 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule String Description { get; set; } /// + /// Returns the UUID of the Owner of the Object. + /// + UUID OwnerId { get; } + + /// + /// Returns the UUID of the Creator of the Object. + /// + UUID CreatorId { get; } + + /// /// Returns the root object of a linkset. If this object is the root, it will return itself. /// IObject Root { get; } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 5bfe4be..f51498c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -169,6 +169,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule } } + public UUID OwnerId + { + get { return GetSOP().OwnerID;} + } + + public UUID CreatorId + { + get { return GetSOP().CreatorID;} + } + public IObject[] Children { get -- cgit v1.1 From b2197e3b94f3865ba3927a4aaaf38cffe141cd72 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 May 2010 23:37:05 +0100 Subject: Apply http://opensimulator.org/mantis/view.php?id=4632 Adds dialog methods for MRM. Thanks ziah. --- .../Scripting/Minimodule/Interfaces/IObject.cs | 18 ++++++++- .../Scripting/Minimodule/SOPObject.cs | 44 +++++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index 29f7f68..e189489 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -189,9 +189,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// /// The message to send to the user void Say(string msg); - + + /// + /// Causes the object to speak to on a specific channel, + /// equivilent to LSL/OSSL llSay + /// + /// The message to send to the user + /// The channel on which to send the message void Say(string msg,int channel); + /// + /// Opens a Dialog Panel in the Users Viewer, + /// equivilent to LSL/OSSL llDialog + /// + /// The UUID of the Avatar to which the Dialog should be send + /// The Message to display at the top of the Dialog + /// The Strings that act as label/value of the Bottons in the Dialog + /// The channel on which to send the response + void Dialog(UUID avatar, string message, string[] buttons, int chat_channel); + //// /// Grants access to the objects inventory /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index f51498c..96cccb7 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -31,6 +31,7 @@ using System.Security; using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; using OpenSim.Region.Physics.Manager; @@ -402,7 +403,48 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule SceneObjectPart sop = GetSOP(); m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); } - + + public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel) + { + if (!CanEdit()) + return; + + IDialogModule dm = m_rootScene.RequestModuleInterface(); + + if (dm == null) + return; + + if (buttons.Length < 1) + { + Say("ERROR: No less than 1 button can be shown",2147483647); + return; + } + if (buttons.Length > 12) + { + Say("ERROR: No more than 12 buttons can be shown",2147483647); + return; + } + + foreach(string button in buttons) + { + if (button == String.Empty) + { + Say("ERROR: button label cannot be blank",2147483647); + return; + } + if (button.Length > 24) + { + Say("ERROR: button label cannot be longer than 24 characters",2147483647); + return; + } + } + + dm.SendDialogToUser( + avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, + message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); + + } + #endregion -- cgit v1.1 From 72b96e81213c0dd3d586f552bd2cbd9221c5341d Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 23 May 2010 06:12:11 +0100 Subject: Add the SitGround flag back in --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 49a7766..d7660fd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -140,6 +140,7 @@ namespace OpenSim.Region.Framework.Scenes private Vector3? m_forceToApply; private uint m_requestedSitTargetID; private UUID m_requestedSitTargetUUID; + public bool SitGround = false; private SendCourseLocationsMethod m_sendCourseLocationsMethod; @@ -1643,7 +1644,7 @@ namespace OpenSim.Region.Framework.Scenes } } - if (update_movementflag) + if (update_movementflag && !SitGround) Animator.UpdateMovementAnimations(); m_scene.EventManager.TriggerOnClientMovement(this); @@ -1754,6 +1755,8 @@ namespace OpenSim.Region.Framework.Scenes /// public void StandUp() { + SitGround = false; + if (m_parentID != 0) { SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); -- cgit v1.1 From f84f0dbd519b75aebc80fea73a8c4fa09592d4a6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 23 May 2010 06:12:40 +0100 Subject: Remove an unneeded conditional --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ad7c3ae..3964b0b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1671,8 +1671,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void StandUp() { - if (SitGround) - SitGround = false; + SitGround = false; if (m_parentID != 0) { -- cgit v1.1 From c7c9edd049c505c949a7a0711cac1cf496c61185 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 24 May 2010 20:11:06 +0100 Subject: minor: expand upon comments about not scheduling two full updates for attachments --- .../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 2352ced..901dcba 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -502,8 +502,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess group.RootPart.IsAttachment = true; } - // For attachments, we must make sure that only a single object update occurs after we've finished - // all the necessary operations. + // If we're rezzing an attachment then don't ask AddNewSceneObject() to update the client since + // we'll be doing that later on. Scheduling more than one full update during the attachment + // process causes some clients to fail to display the attachment properly. m_Scene.AddNewSceneObject(group, true, false); // m_log.InfoFormat("ray end point for inventory rezz is {0} {1} {2} ", RayEnd.X, RayEnd.Y, RayEnd.Z); -- cgit v1.1 From 7d9b316ce6bdb3eee909f8d2621ed8edcf2836e3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 24 May 2010 23:37:47 +0100 Subject: Change the way alpha is interpreted on prim text. Manris #4723 --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 71c8018..2357c6b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3479,7 +3479,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void SetText(string text, Vector3 color, double alpha) { - Color = Color.FromArgb(0xff - (int) (alpha*0xff), + Color = Color.FromArgb((int) (alpha*0xff), (int) (color.X*0xff), (int) (color.Y*0xff), (int) (color.Z*0xff)); -- cgit v1.1 From 5e719d13efc5c8cae5f2a2b3066481250cb7e7e5 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 24 May 2010 19:15:04 -0700 Subject: fix sculpt normal direction for mirrored plane sculpts --- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index 6aa8fe4..e58eb89 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -310,8 +310,7 @@ namespace PrimMesher sculptType = (SculptType)(((int)sculptType) & 0x07); if (mirror) - if (sculptType == SculptType.plane) - invert = !invert; + invert = !invert; viewerFaces = new List(); -- cgit v1.1 From f90d81a864c8ae1cf8125839bc883dc0ace7f214 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 26 May 2010 19:26:30 +0200 Subject: Just because there is an agent update handler, that doesn't mean there is a pre agent update handler. Null check these separately. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 173c9e5..51cc763 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4922,14 +4922,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP arg.SessionID = x.SessionID; arg.State = x.State; UpdateAgent handlerAgentUpdate = OnAgentUpdate; + UpdateAgent handlerPreAgentUpdate = OnPreAgentUpdate; lastarg = arg; // save this set of arguments for nexttime - if (handlerAgentUpdate != null) - { + if (handlerPreAgentUpdate != null) OnPreAgentUpdate(this, arg); + if (handlerAgentUpdate != null) OnAgentUpdate(this, arg); - } handlerAgentUpdate = null; + handlerPreAgentUpdate = null; } } -- cgit v1.1 From ba49319c077bc5e7b998674aaac62497e757706c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 27 May 2010 20:08:48 +0200 Subject: Prevent a null ref --- OpenSim/Region/Framework/Scenes/SceneViewer.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index 4ba4fab..2fc98e5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs @@ -84,6 +84,9 @@ namespace OpenSim.Region.Framework.Scenes while (m_pendingObjects != null && m_pendingObjects.Count > 0) { SceneObjectGroup g = m_pendingObjects.Dequeue(); + // Yes, this can really happen + if (g == null) + continue; // This is where we should check for draw distance // do culling and stuff. Problem with that is that until -- cgit v1.1