diff options
author | Diva Canto | 2010-01-10 19:42:36 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-10 19:42:36 -0800 |
commit | 0c2946031bccf75c28968b6adcde5cce5bc45c13 (patch) | |
tree | a57253af1e81c82ce52dbc44babe60d2defe27fb /OpenSim/Region | |
parent | Moved GridInfo service from where it was to Handlers/Grid (diff) | |
download | opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.zip opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.gz opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.bz2 opensim-SC_OLD-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.xz |
CommunicationsManager is practically empty. Only NetworkServersInfo is there.
Diffstat (limited to 'OpenSim/Region')
9 files changed, 34 insertions, 36 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 3486c8b..2106477 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -52,8 +52,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
52 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 52 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
53 | userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); | 53 | userServices.AddPlugin(new HGUserDataPlugin(this, userServices)); |
54 | 54 | ||
55 | m_userService = userServices; | ||
56 | m_avatarService = userServices; | ||
57 | } | 55 | } |
58 | } | 56 | } |
59 | } | 57 | } |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index d979a01..f75edca 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -58,9 +58,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
58 | hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); | 58 | hgUserService.AddPlugin(new TemporaryUserProfilePlugin()); |
59 | hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService)); | 59 | hgUserService.AddPlugin(new HGUserDataPlugin(this, hgUserService)); |
60 | 60 | ||
61 | m_userService = hgUserService; | ||
62 | m_userAdminService = hgUserService; | ||
63 | m_avatarService = hgUserService; | ||
64 | } | 61 | } |
65 | } | 62 | } |
66 | } | 63 | } |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 4f83fdb..8e7717e 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -48,9 +48,6 @@ namespace OpenSim.Region.Communications.Local | |||
48 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); | 48 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); |
49 | lus.AddPlugin(new TemporaryUserProfilePlugin()); | 49 | lus.AddPlugin(new TemporaryUserProfilePlugin()); |
50 | lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); | 50 | lus.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); |
51 | m_userService = lus; | ||
52 | m_userAdminService = lus; | ||
53 | m_avatarService = lus; | ||
54 | 51 | ||
55 | //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); | 52 | //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService); |
56 | } | 53 | } |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 111b7c0..ede5fda 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -45,8 +45,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
45 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 45 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
46 | userServices.AddPlugin(new OGS1UserDataPlugin(this)); | 46 | userServices.AddPlugin(new OGS1UserDataPlugin(this)); |
47 | 47 | ||
48 | m_userService = userServices; | ||
49 | m_avatarService = (IAvatarService)m_userService; | ||
50 | } | 48 | } |
51 | 49 | ||
52 | } | 50 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 884e6a6..2b3d56d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -154,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) | 154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) |
155 | { | 155 | { |
156 | IClientAPI clientView = (IClientAPI)sender; | 156 | IClientAPI clientView = (IClientAPI)sender; |
157 | ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); | 157 | ScenePresence sp = m_scene.GetScenePresence(clientView.AgentId); |
158 | 158 | ||
159 | if (avatar == null) | 159 | if (sp == null) |
160 | { | 160 | { |
161 | m_log.Error("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); | 161 | m_log.Error("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event"); |
162 | return; | 162 | return; |
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
166 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) | 166 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) |
167 | { | 167 | { |
168 | m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); | 168 | m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); |
169 | avatAppearance = avatar.Appearance; | 169 | avatAppearance = sp.Appearance; |
170 | } | 170 | } |
171 | 171 | ||
172 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); | 172 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); |
@@ -179,10 +179,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
179 | } | 179 | } |
180 | } | 180 | } |
181 | 181 | ||
182 | SetAppearanceAssets(avatar.UUID, ref avatAppearance); | 182 | SetAppearanceAssets(sp.UUID, ref avatAppearance); |
183 | AvatarData adata = new AvatarData(avatAppearance); | ||
184 | m_scene.AvatarService.SetAvatar(clientView.AgentId, adata); | ||
183 | 185 | ||
184 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); | 186 | sp.Appearance = avatAppearance; |
185 | avatar.Appearance = avatAppearance; | ||
186 | } | 187 | } |
187 | 188 | ||
188 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) | 189 | public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) |
@@ -193,7 +194,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
193 | 194 | ||
194 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) | 195 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) |
195 | { | 196 | { |
196 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(user, appearance); | 197 | AvatarData adata = new AvatarData(appearance); |
198 | m_scene.AvatarService.SetAvatar(user, adata); | ||
199 | |||
197 | } | 200 | } |
198 | 201 | ||
199 | private static byte[] GetDefaultVisualParams() | 202 | private static byte[] GetDefaultVisualParams() |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index fbb7660..bbb1938 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -332,14 +332,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
332 | { | 332 | { |
333 | //EventManager.TriggerAvatarPickerRequest(); | 333 | //EventManager.TriggerAvatarPickerRequest(); |
334 | 334 | ||
335 | List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); | 335 | List<UserAccount> accounts = UserAccountService.GetUserAccounts(RegionInfo.ScopeID, query); |
336 | AvatarResponses = m_sceneGridService.GenerateAgentPickerRequestResponse(RequestID, query); | 336 | |
337 | if (accounts == null) | ||
338 | return; | ||
337 | 339 | ||
338 | AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); | 340 | AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); |
339 | // TODO: don't create new blocks if recycling an old packet | 341 | // TODO: don't create new blocks if recycling an old packet |
340 | 342 | ||
341 | AvatarPickerReplyPacket.DataBlock[] searchData = | 343 | AvatarPickerReplyPacket.DataBlock[] searchData = |
342 | new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count]; | 344 | new AvatarPickerReplyPacket.DataBlock[accounts.Count]; |
343 | AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); | 345 | AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); |
344 | 346 | ||
345 | agentData.AgentID = avatarID; | 347 | agentData.AgentID = avatarID; |
@@ -348,16 +350,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
348 | //byte[] bytes = new byte[AvatarResponses.Count*32]; | 350 | //byte[] bytes = new byte[AvatarResponses.Count*32]; |
349 | 351 | ||
350 | int i = 0; | 352 | int i = 0; |
351 | foreach (AvatarPickerAvatar item in AvatarResponses) | 353 | foreach (UserAccount item in accounts) |
352 | { | 354 | { |
353 | UUID translatedIDtem = item.AvatarID; | 355 | UUID translatedIDtem = item.PrincipalID; |
354 | searchData[i] = new AvatarPickerReplyPacket.DataBlock(); | 356 | searchData[i] = new AvatarPickerReplyPacket.DataBlock(); |
355 | searchData[i].AvatarID = translatedIDtem; | 357 | searchData[i].AvatarID = translatedIDtem; |
356 | searchData[i].FirstName = Utils.StringToBytes((string) item.firstName); | 358 | searchData[i].FirstName = Utils.StringToBytes((string) item.FirstName); |
357 | searchData[i].LastName = Utils.StringToBytes((string) item.lastName); | 359 | searchData[i].LastName = Utils.StringToBytes((string) item.LastName); |
358 | i++; | 360 | i++; |
359 | } | 361 | } |
360 | if (AvatarResponses.Count == 0) | 362 | if (accounts.Count == 0) |
361 | { | 363 | { |
362 | searchData = new AvatarPickerReplyPacket.DataBlock[0]; | 364 | searchData = new AvatarPickerReplyPacket.DataBlock[0]; |
363 | } | 365 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 04ecb5f..2e82748 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1443,12 +1443,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1443 | 1443 | ||
1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); | 1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) | ||
1448 | { | ||
1449 | return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); | ||
1450 | } | ||
1451 | |||
1452 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) | 1447 | public List<GridRegion> RequestNamedRegions(string name, int maxNumber) |
1453 | { | 1448 | { |
1454 | return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber); | 1449 | return m_scene.GridService.GetRegionsByName(UUID.Zero, name, maxNumber); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 97415f4..09b53d2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2573,7 +2573,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2573 | m_appearance.SetAppearance(textureEntry, visualParams); | 2573 | m_appearance.SetAppearance(textureEntry, visualParams); |
2574 | if (m_appearance.AvatarHeight > 0) | 2574 | if (m_appearance.AvatarHeight > 0) |
2575 | SetHeight(m_appearance.AvatarHeight); | 2575 | SetHeight(m_appearance.AvatarHeight); |
2576 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 2576 | AvatarData adata = new AvatarData(m_appearance); |
2577 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); | ||
2577 | 2578 | ||
2578 | SendAppearanceToAllOtherAgents(); | 2579 | SendAppearanceToAllOtherAgents(); |
2579 | if (!m_startAnimationSet) | 2580 | if (!m_startAnimationSet) |
@@ -2593,7 +2594,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2593 | public void SetWearable(int wearableId, AvatarWearable wearable) | 2594 | public void SetWearable(int wearableId, AvatarWearable wearable) |
2594 | { | 2595 | { |
2595 | m_appearance.SetWearable(wearableId, wearable); | 2596 | m_appearance.SetWearable(wearableId, wearable); |
2596 | m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); | 2597 | AvatarData adata = new AvatarData(m_appearance); |
2598 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); | ||
2597 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); | 2599 | m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++); |
2598 | } | 2600 | } |
2599 | 2601 | ||
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index ac39a53..a6d4a93 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Region.Framework.Scenes; | |||
34 | using OpenSim.Region.CoreModules.Avatar.NPC; | 34 | using OpenSim.Region.CoreModules.Avatar.NPC; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using Timer=System.Timers.Timer; | 36 | using Timer=System.Timers.Timer; |
37 | using OpenSim.Services.Interfaces; | ||
37 | 38 | ||
38 | namespace OpenSim.Region.OptionalModules.World.NPC | 39 | namespace OpenSim.Region.OptionalModules.World.NPC |
39 | { | 40 | { |
@@ -63,11 +64,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
63 | if (m_appearanceCache.ContainsKey(target)) | 64 | if (m_appearanceCache.ContainsKey(target)) |
64 | return m_appearanceCache[target]; | 65 | return m_appearanceCache[target]; |
65 | 66 | ||
66 | AvatarAppearance x = scene.CommsManager.AvatarService.GetUserAppearance(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | ||
69 | { | ||
70 | AvatarAppearance x = adata.ToAvatarAppearance(); | ||
67 | 71 | ||
68 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
69 | 73 | ||
70 | return x; | 74 | return x; |
75 | } | ||
76 | return new AvatarAppearance(); | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) | 79 | public UUID CreateNPC(string firstname, string lastname,Vector3 position, Scene scene, UUID cloneAppearanceFrom) |