mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
* Major structural change: Begun converting Events to use (caller, args) syntax to conform with .NET guidelines.
* OnChatFromViewer has been converted as an example. * Bug: SimpleApp's NPC client does not implement a Scene property and will likely crash with a NullReferenceException when it attempts to chat.
This commit is contained in:
@@ -70,7 +70,22 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
if (m_simChatModule != null)
|
||||
{
|
||||
m_simChatModule.SimChat(message, type, channel, fromPos, fromName, fromAgentID);
|
||||
ChatFromViewerArgs args = new ChatFromViewerArgs();
|
||||
|
||||
args.Message = OpenSim.Framework.Utilities.Util.FieldToString(message);
|
||||
args.Channel = channel;
|
||||
args.Type = (ChatTypeEnum)type;
|
||||
args.Position = fromPos;
|
||||
|
||||
ScenePresence user = this.GetScenePresence(fromAgentID);
|
||||
if (user != null)
|
||||
args.Sender = user.ControllingClient;
|
||||
else
|
||||
args.Sender = null;
|
||||
|
||||
args.From = fromName;
|
||||
|
||||
m_simChatModule.SimChat(this, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user