Changes to be committed: modified: OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs modified: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs This solves mantis bug# 5005: llRegionSay script does not trigger ChatFromWorld event. This was solved by adding World.SimChat() command to the llRegionSay() function (per suggestion of DrCuriosity). Additionally this fixes llRegionSayTo() which was also not functioning by adding a World.SimChat() command and adding a new SimChatToAgent() overrided function to Scene.PacketHandlers.cs This is the second patch revision. Corrections made to the position of World.SimChat() and removal of tabs per suggestion by justincc.
parent
376fab1402
commit
427240f935
|
@ -144,6 +144,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SimChat(message, ChatTypeEnum.Say, 0, fromPos, fromName, fromID, targetID, fromAgent, false);
|
SimChat(message, ChatTypeEnum.Say, 0, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <param name="channel"></param>
|
||||||
|
/// <param name="fromPos"></param>
|
||||||
|
/// <param name="fromName"></param>
|
||||||
|
/// <param name="fromAgentID"></param>
|
||||||
|
/// <param name="targetID"></param>
|
||||||
|
public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
|
||||||
|
{
|
||||||
|
SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when the client requests a prim.
|
/// Invoked when the client requests a prim.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -968,6 +968,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
World.SimChat(Utils.StringToBytes(text),
|
||||||
|
ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
if (wComm != null)
|
if (wComm != null)
|
||||||
wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
|
wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
|
||||||
|
@ -988,6 +991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
UUID TargetID;
|
UUID TargetID;
|
||||||
UUID.TryParse(target, out TargetID);
|
UUID.TryParse(target, out TargetID);
|
||||||
|
|
||||||
|
World.SimChatToAgent(TargetID, Utils.StringToBytes(msg),
|
||||||
|
channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
if (wComm != null)
|
if (wComm != null)
|
||||||
wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);
|
wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);
|
||||||
|
|
Loading…
Reference in New Issue