aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-26 19:32:41 +0000
committerMelanie Thielker2008-10-26 19:32:41 +0000
commitf7e44250bf6058a7f232b5555d709787f1a2eb6b (patch)
treef9197d06761c96d1b47f0b4dd56cef8aca6bf4b5 /OpenSim/Region/Environment
parentThank you kindly, Idb for a patch that solves: (diff)
downloadopensim-SC-f7e44250bf6058a7f232b5555d709787f1a2eb6b.zip
opensim-SC-f7e44250bf6058a7f232b5555d709787f1a2eb6b.tar.gz
opensim-SC-f7e44250bf6058a7f232b5555d709787f1a2eb6b.tar.bz2
opensim-SC-f7e44250bf6058a7f232b5555d709787f1a2eb6b.tar.xz
Committing a small fix for EventData along with more plumbing work
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
3 files changed, 28 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
index 3e45f7f..2553266 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -118,13 +118,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
118 || dialog == (byte) InstantMessageDialog.InventoryOffered 118 || dialog == (byte) InstantMessageDialog.InventoryOffered
119 || dialog == (byte) InstantMessageDialog.InventoryAccepted 119 || dialog == (byte) InstantMessageDialog.InventoryAccepted
120 || dialog == (byte) InstantMessageDialog.InventoryDeclined 120 || dialog == (byte) InstantMessageDialog.InventoryDeclined
121 || dialog == (byte) InstantMessageDialog.GroupNoticeInventoryAccepted
122 || dialog == (byte) InstantMessageDialog.GroupNoticeInventoryDeclined
123 || dialog == (byte) InstantMessageDialog.GroupInvitationAccept
124 || dialog == (byte) InstantMessageDialog.GroupInvitationDecline
121 || dialog == (byte) InstantMessageDialog.GroupNotice); 125 || dialog == (byte) InstantMessageDialog.GroupNotice);
122 126
123 // IM dialogs need to be pre-processed and have their sessionID filled by the server 127 // IM dialogs need to be pre-processed and have their sessionID filled by the server
124 // so the sim can match the transaction on the return packet. 128 // so the sim can match the transaction on the return packet.
125 129
126 // Don't send a Friend Dialog IM with a UUID.Zero session. 130 // Don't send a Friend Dialog IM with a UUID.Zero session.
127 if (!(dialogHandledElsewhere && imSessionID == UUID.Zero)) 131 if (!dialogHandledElsewhere)
128 { 132 {
129 // Try root avatar only first 133 // Try root avatar only first
130 foreach (Scene scene in m_scenes) 134 foreach (Scene scene in m_scenes)
@@ -137,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
137 { 141 {
138 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, 142 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
139 toAgentID, imSessionID, fromAgentName, dialog, 143 toAgentID, imSessionID, fromAgentName, dialog,
140 timestamp); 144 timestamp, fromGroup, binaryBucket);
141 // Message sent 145 // Message sent
142 return; 146 return;
143 } 147 }
@@ -154,7 +158,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
154 158
155 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, 159 user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message,
156 toAgentID, imSessionID, fromAgentName, dialog, 160 toAgentID, imSessionID, fromAgentName, dialog,
157 timestamp); 161 timestamp, fromGroup, binaryBucket);
158 // Message sent 162 // Message sent
159 return; 163 return;
160 } 164 }
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 5c22bb1..3e78396 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
547 { 547 {
548 } 548 }
549 549
550 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID, 550 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID,
551 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) 551 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
552 { 552 {
553 } 553 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index a8476fd..38427cf 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -284,6 +284,14 @@ namespace OpenSim.Region.Environment.Scenes
284 get { return m_lastname; } 284 get { return m_lastname; }
285 } 285 }
286 286
287 private string m_grouptitle;
288
289 public string Grouptitle
290 {
291 get { return m_grouptitle; }
292 set { m_grouptitle = value; }
293 }
294
287 public float DrawDistance 295 public float DrawDistance
288 { 296 {
289 get { return m_DrawDistance; } 297 get { return m_DrawDistance; }
@@ -484,6 +492,10 @@ namespace OpenSim.Region.Environment.Scenes
484 m_regionInfo = reginfo; 492 m_regionInfo = reginfo;
485 m_localId = m_scene.NextLocalId; 493 m_localId = m_scene.NextLocalId;
486 494
495 IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
496 if (gm != null)
497 m_grouptitle = gm.GetGroupTitle(m_uuid);
498
487 AbsolutePosition = m_controllingClient.StartPos; 499 AbsolutePosition = m_controllingClient.StartPos;
488 500
489 TrySetMovementAnimation("STAND"); // TODO: I think, this won't send anything, as we are still a child here... 501 TrySetMovementAnimation("STAND"); // TODO: I think, this won't send anything, as we are still a child here...
@@ -691,6 +703,10 @@ namespace OpenSim.Region.Environment.Scenes
691 /// </summary> 703 /// </summary>
692 public void MakeRootAgent(Vector3 pos, bool isFlying) 704 public void MakeRootAgent(Vector3 pos, bool isFlying)
693 { 705 {
706 IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
707 if (gm != null)
708 m_grouptitle = gm.GetGroupTitle(m_uuid);
709
694 m_scene.SetRootAgentScene(m_uuid); 710 m_scene.SetRootAgentScene(m_uuid);
695 711
696 IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>(); 712 IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>();
@@ -1755,7 +1771,7 @@ namespace OpenSim.Region.Environment.Scenes
1755 // Note: because Quaternion is a struct, it can't be null 1771 // Note: because Quaternion is a struct, it can't be null
1756 Quaternion rot = m_bodyRot; 1772 Quaternion rot = m_bodyRot;
1757 1773
1758 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, 1774 remoteAvatar.m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
1759 LocalId, m_pos, m_appearance.Texture.ToBytes(), 1775 LocalId, m_pos, m_appearance.Texture.ToBytes(),
1760 m_parentID, rot); 1776 m_parentID, rot);
1761 m_scene.AddAgentUpdates(1); 1777 m_scene.AddAgentUpdates(1);
@@ -1804,6 +1820,8 @@ namespace OpenSim.Region.Environment.Scenes
1804 } 1820 }
1805 m_scene.AddAgentUpdates(avatars.Count); 1821 m_scene.AddAgentUpdates(avatars.Count);
1806 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1822 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1823
1824 SendAnimPack();
1807 } 1825 }
1808 1826
1809 /// <summary> 1827 /// <summary>
@@ -1818,7 +1836,7 @@ namespace OpenSim.Region.Environment.Scenes
1818 // Note: because Quaternion is a struct, it can't be null 1836 // Note: because Quaternion is a struct, it can't be null
1819 Quaternion rot = m_bodyRot; 1837 Quaternion rot = m_bodyRot;
1820 1838
1821 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_uuid, LocalId, 1839 m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
1822 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot); 1840 m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
1823 1841
1824 if (!m_isChildAgent) 1842 if (!m_isChildAgent)