Merge branch 'master' into careminster-presence-refactor

Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
avinationmerge
Melanie 2010-05-23 06:09:54 +01:00
commit a9dad99432
12 changed files with 134 additions and 3 deletions

View File

@ -943,6 +943,10 @@ namespace OpenSim.Client.MXP.ClientStack
// Need to translate to MXP somehow
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{
// Need to translate to MXP somehow

View File

@ -513,6 +513,10 @@ namespace OpenSim.Client.Sirikata.ClientStack
throw new System.NotImplementedException();
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{
throw new System.NotImplementedException();

View File

@ -519,6 +519,10 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
throw new System.NotImplementedException();
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{
throw new System.NotImplementedException();

View File

@ -985,6 +985,7 @@ namespace OpenSim.Framework
void SendInstantMessage(GridInstantMessage im);
void SendGenericMessage(string method, List<string> message);
void SendGenericMessage(string method, List<byte[]> message);
void SendLayerData(float[] map);

View File

@ -831,6 +831,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
public void SendGenericMessage(string method, List<string> 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<byte[]> message)
{
GenericMessagePacket gmp = new GenericMessagePacket();

View File

@ -461,6 +461,10 @@ namespace OpenSim.Region.Examples.SimpleModule
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{

View File

@ -1393,6 +1393,12 @@ namespace OpenSim.Region.Framework.Scenes
{
m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.
Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
// TODO: This doesn't prevent the user from walking yet.
// 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;
}
// In the future, these values might need to go global.
@ -1409,7 +1415,7 @@ namespace OpenSim.Region.Framework.Scenes
bool update_movementflag = false;
if (m_allowMovement)
if (m_allowMovement && !SitGround)
{
if (agentData.UseClientAgentPosition)
{

View File

@ -974,6 +974,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
// TODO
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{

View File

@ -97,6 +97,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
/// </summary>
String Description { get; set; }
/// <summary>
/// Returns the UUID of the Owner of the Object.
/// </summary>
UUID OwnerId { get; }
/// <summary>
/// Returns the UUID of the Creator of the Object.
/// </summary>
UUID CreatorId { get; }
/// <summary>
/// Returns the root object of a linkset. If this object is the root, it will return itself.
/// </summary>
@ -180,8 +190,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
/// <param name="msg">The message to send to the user</param>
void Say(string msg);
/// <summary>
/// Causes the object to speak to on a specific channel,
/// equivilent to LSL/OSSL llSay
/// </summary>
/// <param name="msg">The message to send to the user</param>
/// <param name="channel">The channel on which to send the message</param>
void Say(string msg,int channel);
/// <summary>
/// Opens a Dialog Panel in the Users Viewer,
/// equivilent to LSL/OSSL llDialog
/// </summary>
/// <param name="avatar">The UUID of the Avatar to which the Dialog should be send</param>
/// <param name="message">The Message to display at the top of the Dialog</param>
/// <param name="buttons">The Strings that act as label/value of the Bottons in the Dialog</param>
/// <param name="chat_channel">The channel on which to send the response</param>
void Dialog(UUID avatar, string message, string[] buttons, int chat_channel);
//// <value>
/// Grants access to the objects inventory
/// </value>

View File

@ -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;
@ -169,6 +170,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
@ -393,6 +404,47 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
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<IDialogModule>();
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

View File

@ -551,6 +551,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{

View File

@ -519,6 +519,11 @@ namespace OpenSim.Tests.Common.Mock
}
public void SendGenericMessage(string method, List<string> message)
{
}
public void SendGenericMessage(string method, List<byte[]> message)
{