diff options
author | UbitUmarov | 2015-11-20 00:01:13 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-20 00:01:13 +0000 |
commit | 278687b1e8bed66e205497ebdef839280dfa5cd2 (patch) | |
tree | 9c57a67637d8da11bc03995c0f072f7d424bb791 /OpenSim | |
parent | clean code a bit (diff) | |
download | opensim-SC-278687b1e8bed66e205497ebdef839280dfa5cd2.zip opensim-SC-278687b1e8bed66e205497ebdef839280dfa5cd2.tar.gz opensim-SC-278687b1e8bed66e205497ebdef839280dfa5cd2.tar.bz2 opensim-SC-278687b1e8bed66e205497ebdef839280dfa5cd2.tar.xz |
remove duplicate object chat messages ( mantis 7745 ),fix llRegionSay, this are still merge issues
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 1a53a8b..9282897 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -311,6 +311,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
311 | // Determine which listen event filters match the given set of arguments, this results | 311 | // Determine which listen event filters match the given set of arguments, this results |
312 | // in a limited set of listeners, each belonging a host. If the host is in range, add them | 312 | // in a limited set of listeners, each belonging a host. If the host is in range, add them |
313 | // to the pending queue. | 313 | // to the pending queue. |
314 | |||
314 | foreach (ListenerInfo li | 315 | foreach (ListenerInfo li |
315 | in m_listenerManager.GetListeners(UUID.Zero, channel, | 316 | in m_listenerManager.GetListeners(UUID.Zero, channel, |
316 | name, id, msg)) | 317 | name, id, msg)) |
@@ -386,6 +387,10 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
386 | return true; | 387 | return true; |
387 | } | 388 | } |
388 | 389 | ||
390 | // for now messages to prims don't cross regions | ||
391 | if(sp.IsChildAgent) | ||
392 | return false; | ||
393 | |||
389 | List<SceneObjectGroup> attachments = sp.GetAttachments(); | 394 | List<SceneObjectGroup> attachments = sp.GetAttachments(); |
390 | 395 | ||
391 | if (attachments.Count == 0) | 396 | if (attachments.Count == 0) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c8deec5..e2b3ef4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1264,8 +1264,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1264 | 1264 | ||
1265 | m_host.AddScriptLPS(1); | 1265 | m_host.AddScriptLPS(1); |
1266 | 1266 | ||
1267 | World.SimChat(Utils.StringToBytes(text), | 1267 | // debug channel is also sent to avatars |
1268 | ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); | 1268 | if (channelID == ScriptBaseClass.DEBUG_CHANNEL) |
1269 | { | ||
1270 | World.SimChat(Utils.StringToBytes(text), | ||
1271 | ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); | ||
1272 | |||
1273 | } | ||
1269 | 1274 | ||
1270 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1275 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1271 | if (wComm != null) | 1276 | if (wComm != null) |
@@ -1280,16 +1285,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1280 | m_host.AddScriptLPS(1); | 1285 | m_host.AddScriptLPS(1); |
1281 | 1286 | ||
1282 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) | 1287 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) |
1283 | { | ||
1284 | return; | 1288 | return; |
1285 | } | ||
1286 | 1289 | ||
1287 | UUID TargetID; | 1290 | UUID TargetID; |
1288 | UUID.TryParse(target, out TargetID); | 1291 | UUID.TryParse(target, out TargetID); |
1289 | 1292 | ||
1290 | World.SimChatToAgent(TargetID, Utils.StringToBytes(msg), | ||
1291 | channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); | ||
1292 | |||
1293 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1293 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1294 | if (wComm != null) | 1294 | if (wComm != null) |
1295 | wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); | 1295 | wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); |