diff options
author | Drake Arconis | 2015-08-14 18:10:07 -0400 |
---|---|---|
committer | Melanie Thielker | 2015-08-15 01:18:20 +0200 |
commit | a5967d918aee8cb6945b092f77b05def38d9eca8 (patch) | |
tree | 16adf9247e2bd0cceac90bc5ac3f45a271d0d978 /OpenSim/Region/CoreModules/Avatar | |
parent | Remove DOS line endings from LSL_API.cs (diff) | |
download | opensim-SC-a5967d918aee8cb6945b092f77b05def38d9eca8.zip opensim-SC-a5967d918aee8cb6945b092f77b05def38d9eca8.tar.gz opensim-SC-a5967d918aee8cb6945b092f77b05def38d9eca8.tar.bz2 opensim-SC-a5967d918aee8cb6945b092f77b05def38d9eca8.tar.xz |
Send a proper ownerid for Object messages to conform with what viewer expects
Signed-off-by: Melanie Thielker <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 10122e6..a9d2de0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -274,17 +274,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
274 | string fromName = c.From; | 274 | string fromName = c.From; |
275 | 275 | ||
276 | UUID fromID = UUID.Zero; | 276 | UUID fromID = UUID.Zero; |
277 | UUID ownerID = UUID.Zero; | ||
277 | ChatSourceType sourceType = ChatSourceType.Object; | 278 | ChatSourceType sourceType = ChatSourceType.Object; |
278 | if (null != c.Sender) | 279 | if (null != c.Sender) |
279 | { | 280 | { |
280 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); | 281 | ScenePresence avatar = (c.Scene as Scene).GetScenePresence(c.Sender.AgentId); |
281 | fromID = c.Sender.AgentId; | 282 | fromID = c.Sender.AgentId; |
282 | fromName = avatar.Name; | 283 | fromName = avatar.Name; |
284 | ownerID = c.Sender.AgentId; | ||
283 | sourceType = ChatSourceType.Agent; | 285 | sourceType = ChatSourceType.Agent; |
284 | } | 286 | } |
285 | else if (c.SenderUUID != UUID.Zero) | 287 | else if (c.SenderUUID != UUID.Zero) |
286 | { | 288 | { |
287 | fromID = c.SenderUUID; | 289 | fromID = c.SenderUUID; |
290 | ownerID = ((SceneObjectPart)c.SenderObject).OwnerID; | ||
288 | } | 291 | } |
289 | 292 | ||
290 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 293 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
@@ -302,7 +305,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
302 | return; | 305 | return; |
303 | 306 | ||
304 | client.SendChatMessage( | 307 | client.SendChatMessage( |
305 | c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID, | 308 | c.Message, (byte)cType, CenterOfRegion, fromName, fromID, ownerID, |
306 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | 309 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); |
307 | 310 | ||
308 | receiverIDs.Add(client.AgentId); | 311 | receiverIDs.Add(client.AgentId); |