diff options
author | Diva Canto | 2010-01-11 17:30:05 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-11 17:30:05 -0800 |
commit | 77e43f480154b0a950d9d5f54df5c225fc64e77a (patch) | |
tree | 48f1806bd8b0d0f50aef89846bcc186d3ad3eb74 | |
parent | This fixes the problem that region modules (new style) weren't being recognized. (diff) | |
download | opensim-SC-77e43f480154b0a950d9d5f54df5c225fc64e77a.zip opensim-SC-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.gz opensim-SC-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.bz2 opensim-SC-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.xz |
Fixed a couple of bugs with Appearance. Appearance is all good now.
Diffstat (limited to '')
16 files changed, 124 insertions, 68 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index d9458af..457177d 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -1397,7 +1397,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1397 | AvatarAppearance ava = null; | 1397 | AvatarAppearance ava = null; |
1398 | AvatarData avatar = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(srca); | 1398 | AvatarData avatar = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(srca); |
1399 | if (avatar != null) | 1399 | if (avatar != null) |
1400 | ava = avatar.ToAvatarAppearance(); | 1400 | ava = avatar.ToAvatarAppearance(srca); |
1401 | 1401 | ||
1402 | // If the model has no associated appearance we're done. | 1402 | // If the model has no associated appearance we're done. |
1403 | 1403 | ||
@@ -1639,7 +1639,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1639 | // While the inventory is being fetched, setup for appearance processing | 1639 | // While the inventory is being fetched, setup for appearance processing |
1640 | AvatarData adata = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(ID); | 1640 | AvatarData adata = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(ID); |
1641 | if (adata != null) | 1641 | if (adata != null) |
1642 | mava = adata.ToAvatarAppearance(); | 1642 | mava = adata.ToAvatarAppearance(ID); |
1643 | else | 1643 | else |
1644 | mava = new AvatarAppearance(); | 1644 | mava = new AvatarAppearance(); |
1645 | 1645 | ||
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 5429890..b70a511 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | |||
@@ -304,7 +304,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
304 | String.Format("appearance data not found for user {0} {1}", | 304 | String.Format("appearance data not found for user {0} {1}", |
305 | rdata.userProfile.FirstName, rdata.userProfile.SurName)); | 305 | rdata.userProfile.FirstName, rdata.userProfile.SurName)); |
306 | } | 306 | } |
307 | rdata.userAppearance = adata.ToAvatarAppearance(); | 307 | rdata.userAppearance = adata.ToAvatarAppearance(rdata.userProfile.ID); |
308 | 308 | ||
309 | rdata.initXmlWriter(); | 309 | rdata.initXmlWriter(); |
310 | 310 | ||
@@ -446,7 +446,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
446 | 446 | ||
447 | if (adata != null) | 447 | if (adata != null) |
448 | { | 448 | { |
449 | AvatarAppearance old = adata.ToAvatarAppearance(); | 449 | AvatarAppearance old = adata.ToAvatarAppearance(rdata.userProfile.ID); |
450 | rdata.userAppearance = new AvatarAppearance(); | 450 | rdata.userAppearance = new AvatarAppearance(); |
451 | rdata.userAppearance.Owner = old.Owner; | 451 | rdata.userAppearance.Owner = old.Owner; |
452 | adata = new AvatarData(rdata.userAppearance); | 452 | adata = new AvatarData(rdata.userAppearance); |
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index c4b3dda..821aea2 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | |||
@@ -536,7 +536,7 @@ namespace OpenSim.Client.MXP.PacketHandler | |||
536 | agent.CapsPath = "http://localhost/"; | 536 | agent.CapsPath = "http://localhost/"; |
537 | AvatarData avatar = scene.AvatarService.GetAvatar(account.PrincipalID); | 537 | AvatarData avatar = scene.AvatarService.GetAvatar(account.PrincipalID); |
538 | if (avatar != null) | 538 | if (avatar != null) |
539 | agent.Appearance = avatar.ToAvatarAppearance(); //userService.GetUserAppearance(userProfile.ID); | 539 | agent.Appearance = avatar.ToAvatarAppearance(account.PrincipalID); //userService.GetUserAppearance(userProfile.ID); |
540 | 540 | ||
541 | if (agent.Appearance == null) | 541 | if (agent.Appearance == null) |
542 | { | 542 | { |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index c6932cf..f3f715a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -197,7 +197,6 @@ namespace OpenSim | |||
197 | LoadPlugins(); | 197 | LoadPlugins(); |
198 | foreach (IApplicationPlugin plugin in m_plugins) | 198 | foreach (IApplicationPlugin plugin in m_plugins) |
199 | { | 199 | { |
200 | m_log.Debug("XXX PostInitialise " + plugin.Name); | ||
201 | plugin.PostInitialise(); | 200 | plugin.PostInitialise(); |
202 | } | 201 | } |
203 | 202 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 795b099..b937226 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -5474,6 +5474,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5474 | // for the client session anyway, in order to protect ourselves against bad code in plugins | 5474 | // for the client session anyway, in order to protect ourselves against bad code in plugins |
5475 | try | 5475 | try |
5476 | { | 5476 | { |
5477 | |||
5477 | byte[] visualparams = new byte[appear.VisualParam.Length]; | 5478 | byte[] visualparams = new byte[appear.VisualParam.Length]; |
5478 | for (int i = 0; i < appear.VisualParam.Length; i++) | 5479 | for (int i = 0; i < appear.VisualParam.Length; i++) |
5479 | visualparams[i] = appear.VisualParam[i].ParamValue; | 5480 | visualparams[i] = appear.VisualParam[i].ParamValue; |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 87d0b0d..c01d66a 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
50 | //if ((profile != null) && (profile.RootFolder != null)) | 50 | //if ((profile != null) && (profile.RootFolder != null)) |
51 | if (avatar != null) | 51 | if (avatar != null) |
52 | { | 52 | { |
53 | appearance = avatar.ToAvatarAppearance(); | 53 | appearance = avatar.ToAvatarAppearance(avatarId); |
54 | return true; | 54 | return true; |
55 | } | 55 | } |
56 | 56 | ||
@@ -153,6 +153,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
153 | /// <param name="e"></param> | 153 | /// <param name="e"></param> |
154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) | 154 | public void AvatarIsWearing(Object sender, AvatarWearingArgs e) |
155 | { | 155 | { |
156 | m_log.DebugFormat("[APPEARANCE]: AvatarIsWearing"); | ||
157 | |||
156 | IClientAPI clientView = (IClientAPI)sender; | 158 | IClientAPI clientView = (IClientAPI)sender; |
157 | ScenePresence sp = m_scene.GetScenePresence(clientView.AgentId); | 159 | ScenePresence sp = m_scene.GetScenePresence(clientView.AgentId); |
158 | 160 | ||
@@ -162,12 +164,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
162 | return; | 164 | return; |
163 | } | 165 | } |
164 | 166 | ||
165 | AvatarAppearance avatAppearance = null; | 167 | AvatarAppearance avatAppearance = sp.Appearance; |
166 | if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) | 168 | //if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) |
167 | { | 169 | //{ |
168 | m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); | 170 | // m_log.Warn("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresence"); |
169 | avatAppearance = sp.Appearance; | 171 | // avatAppearance = sp.Appearance; |
170 | } | 172 | //} |
171 | 173 | ||
172 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); | 174 | //m_log.DebugFormat("[APPEARANCE]: Received wearables for {0}", clientView.Name); |
173 | 175 | ||
@@ -194,6 +196,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
194 | 196 | ||
195 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) | 197 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) |
196 | { | 198 | { |
199 | m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); | ||
197 | AvatarData adata = new AvatarData(appearance); | 200 | AvatarData adata = new AvatarData(appearance); |
198 | m_scene.AvatarService.SetAvatar(user, adata); | 201 | m_scene.AvatarService.SetAvatar(user, adata); |
199 | 202 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs index 0c8ee61..47f19a3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar | |||
72 | IConfig userConfig = source.Configs["AvatarService"]; | 72 | IConfig userConfig = source.Configs["AvatarService"]; |
73 | if (userConfig == null) | 73 | if (userConfig == null) |
74 | { | 74 | { |
75 | m_log.Error("[USER CONNECTOR]: AvatarService missing from OpenSim.ini"); | 75 | m_log.Error("[AVATAR CONNECTOR]: AvatarService missing from OpenSim.ini"); |
76 | return; | 76 | return; |
77 | } | 77 | } |
78 | 78 | ||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar | |||
81 | 81 | ||
82 | if (serviceDll == String.Empty) | 82 | if (serviceDll == String.Empty) |
83 | { | 83 | { |
84 | m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section AvatarService"); | 84 | m_log.Error("[AVATAR CONNECTOR]: No LocalServiceModule named in section AvatarService"); |
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
@@ -92,11 +92,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar | |||
92 | 92 | ||
93 | if (m_AvatarService == null) | 93 | if (m_AvatarService == null) |
94 | { | 94 | { |
95 | m_log.Error("[USER CONNECTOR]: Can't load user account service"); | 95 | m_log.Error("[AVATAR CONNECTOR]: Can't load user account service"); |
96 | return; | 96 | return; |
97 | } | 97 | } |
98 | m_Enabled = true; | 98 | m_Enabled = true; |
99 | m_log.Info("[USER CONNECTOR]: Local avatar connector enabled"); | 99 | m_log.Info("[AVATAR CONNECTOR]: Local avatar connector enabled"); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | } | 102 | } |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar | |||
118 | if (!m_Enabled) | 118 | if (!m_Enabled) |
119 | return; | 119 | return; |
120 | 120 | ||
121 | scene.RegisterModuleInterface<IAvatarService>(m_AvatarService); | 121 | scene.RegisterModuleInterface<IAvatarService>(this); |
122 | } | 122 | } |
123 | 123 | ||
124 | public void RemoveRegion(Scene scene) | 124 | public void RemoveRegion(Scene scene) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 3f71715..70aea75 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2358,7 +2358,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2358 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 2358 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2359 | item = InventoryService.GetItem(item); | 2359 | item = InventoryService.GetItem(item); |
2360 | 2360 | ||
2361 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2361 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, /*item.AssetID*/ att.UUID); |
2362 | } | 2362 | } |
2363 | return att.UUID; | 2363 | return att.UUID; |
2364 | } | 2364 | } |
@@ -2403,7 +2403,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2403 | // XXYY!! | 2403 | // XXYY!! |
2404 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 2404 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
2405 | item = InventoryService.GetItem(item); | 2405 | item = InventoryService.GetItem(item); |
2406 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); | 2406 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, /*item.AssetID*/ att.UUID); |
2407 | 2407 | ||
2408 | if (m_AvatarFactory != null) | 2408 | if (m_AvatarFactory != null) |
2409 | { | 2409 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index db0da34..db7b3ff 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -300,7 +300,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
300 | get | 300 | get |
301 | { | 301 | { |
302 | if (m_AvatarService == null) | 302 | if (m_AvatarService == null) |
303 | m_AvatarService = RequestModuleInterface<OpenSim.Services.Interfaces.IAvatarService>(); | 303 | m_AvatarService = RequestModuleInterface<IAvatarService>(); |
304 | return m_AvatarService; | 304 | return m_AvatarService; |
305 | } | 305 | } |
306 | } | 306 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 7d9b427..11cb8cd 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -250,7 +250,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
250 | { | 250 | { |
251 | InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate) iar.AsyncState; | 251 | InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate) iar.AsyncState; |
252 | icon.EndInvoke(iar); | 252 | icon.EndInvoke(iar); |
253 | m_log.WarnFormat(" --> InformClientOfNeighbourCompleted"); | 253 | //m_log.WarnFormat(" --> InformClientOfNeighbourCompleted"); |
254 | } | 254 | } |
255 | 255 | ||
256 | /// <summary> | 256 | /// <summary> |
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
456 | int count = 0; | 456 | int count = 0; |
457 | foreach (GridRegion neighbour in neighbours) | 457 | foreach (GridRegion neighbour in neighbours) |
458 | { | 458 | { |
459 | m_log.WarnFormat("--> Going to send child agent to {0}", neighbour.RegionName); | 459 | //m_log.WarnFormat("--> Going to send child agent to {0}", neighbour.RegionName); |
460 | // Don't do it if there's already an agent in that region | 460 | // Don't do it if there's already an agent in that region |
461 | if (newRegions.Contains(neighbour.RegionHandle)) | 461 | if (newRegions.Contains(neighbour.RegionHandle)) |
462 | newAgent = true; | 462 | newAgent = true; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 47eaa95..ae586a1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2565,14 +2565,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2565 | } | 2565 | } |
2566 | } | 2566 | } |
2567 | } | 2567 | } |
2568 | |||
2568 | } | 2569 | } |
2569 | 2570 | ||
2571 | |||
2570 | #endregion Bake Cache Check | 2572 | #endregion Bake Cache Check |
2571 | 2573 | ||
2572 | m_appearance.SetAppearance(textureEntry, visualParams); | 2574 | m_appearance.SetAppearance(textureEntry, visualParams); |
2573 | if (m_appearance.AvatarHeight > 0) | 2575 | if (m_appearance.AvatarHeight > 0) |
2574 | SetHeight(m_appearance.AvatarHeight); | 2576 | SetHeight(m_appearance.AvatarHeight); |
2577 | |||
2575 | AvatarData adata = new AvatarData(m_appearance); | 2578 | AvatarData adata = new AvatarData(m_appearance); |
2579 | |||
2576 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); | 2580 | m_scene.AvatarService.SetAvatar(m_controllingClient.AgentId, adata); |
2577 | 2581 | ||
2578 | SendAppearanceToAllOtherAgents(); | 2582 | SendAppearanceToAllOtherAgents(); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index a6d4a93..6e742f1 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
67 | AvatarData adata = scene.AvatarService.GetAvatar(target); | 67 | AvatarData adata = scene.AvatarService.GetAvatar(target); |
68 | if (adata != null) | 68 | if (adata != null) |
69 | { | 69 | { |
70 | AvatarAppearance x = adata.ToAvatarAppearance(); | 70 | AvatarAppearance x = adata.ToAvatarAppearance(target); |
71 | 71 | ||
72 | m_appearanceCache.Add(target, x); | 72 | m_appearanceCache.Add(target, x); |
73 | 73 | ||
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs index 0b351a2..19e662c 100644 --- a/OpenSim/Services/AvatarService/AvatarService.cs +++ b/OpenSim/Services/AvatarService/AvatarService.cs | |||
@@ -73,6 +73,12 @@ namespace OpenSim.Services.AvatarService | |||
73 | 73 | ||
74 | public bool SetAvatar(UUID principalID, AvatarData avatar) | 74 | public bool SetAvatar(UUID principalID, AvatarData avatar) |
75 | { | 75 | { |
76 | int count = 0; | ||
77 | foreach (KeyValuePair<string, string> kvp in avatar.Data) | ||
78 | if (kvp.Key.StartsWith("_")) | ||
79 | count++; | ||
80 | |||
81 | m_log.DebugFormat("[AVATAR SERVICE]: SetAvatar for {0}, attachs={1}", principalID, count); | ||
76 | m_Database.Delete("PrincipalID", principalID.ToString()); | 82 | m_Database.Delete("PrincipalID", principalID.ToString()); |
77 | 83 | ||
78 | AvatarBaseData av = new AvatarBaseData(); | 84 | AvatarBaseData av = new AvatarBaseData(); |
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index ea08ea5..564c406 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -131,17 +131,15 @@ namespace OpenSim.Services.Interfaces | |||
131 | AvatarType = 1; // SL avatars | 131 | AvatarType = 1; // SL avatars |
132 | Data = new Dictionary<string, string>(); | 132 | Data = new Dictionary<string, string>(); |
133 | 133 | ||
134 | Data["Serial"] = appearance.Serial.ToString(); | ||
134 | // Wearables | 135 | // Wearables |
135 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); | 136 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); |
136 | Data["BodyItem"] = appearance.BodyItem.ToString(); | 137 | Data["BodyItem"] = appearance.BodyItem.ToString(); |
137 | Data["EyesItem"] = appearance.EyesItem.ToString(); | 138 | Data["EyesItem"] = appearance.EyesItem.ToString(); |
138 | Data["GlovesItem"] = appearance.GlovesItem.ToString(); | 139 | Data["GlovesItem"] = appearance.GlovesItem.ToString(); |
139 | Data["HairItem"] = appearance.HairItem.ToString(); | 140 | Data["HairItem"] = appearance.HairItem.ToString(); |
140 | //Data["HipOffset"] = appearance.HipOffset.ToString(); | ||
141 | Data["JacketItem"] = appearance.JacketItem.ToString(); | 141 | Data["JacketItem"] = appearance.JacketItem.ToString(); |
142 | Data["Owner"] = appearance.Owner.ToString(); | ||
143 | Data["PantsItem"] = appearance.PantsItem.ToString(); | 142 | Data["PantsItem"] = appearance.PantsItem.ToString(); |
144 | Data["Serial"] = appearance.Serial.ToString(); | ||
145 | Data["ShirtItem"] = appearance.ShirtItem.ToString(); | 143 | Data["ShirtItem"] = appearance.ShirtItem.ToString(); |
146 | Data["ShoesItem"] = appearance.ShoesItem.ToString(); | 144 | Data["ShoesItem"] = appearance.ShoesItem.ToString(); |
147 | Data["SkinItem"] = appearance.SkinItem.ToString(); | 145 | Data["SkinItem"] = appearance.SkinItem.ToString(); |
@@ -150,53 +148,92 @@ namespace OpenSim.Services.Interfaces | |||
150 | Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); | 148 | Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); |
151 | Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); | 149 | Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); |
152 | 150 | ||
151 | Data["BodyAsset"] = appearance.BodyAsset.ToString(); | ||
152 | Data["EyesAsset"] = appearance.EyesAsset.ToString(); | ||
153 | Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); | ||
154 | Data["HairAsset"] = appearance.HairAsset.ToString(); | ||
155 | Data["JacketAsset"] = appearance.JacketAsset.ToString(); | ||
156 | Data["PantsAsset"] = appearance.PantsAsset.ToString(); | ||
157 | Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); | ||
158 | Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); | ||
159 | Data["SkinAsset"] = appearance.SkinAsset.ToString(); | ||
160 | Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); | ||
161 | Data["SocksAsset"] = appearance.SocksAsset.ToString(); | ||
162 | Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); | ||
163 | Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); | ||
164 | |||
153 | // Attachments | 165 | // Attachments |
154 | Hashtable attachs = appearance.GetAttachments(); | 166 | Hashtable attachs = appearance.GetAttachments(); |
155 | foreach (KeyValuePair<int, Hashtable> kvp in attachs) | 167 | if (attachs != null) |
156 | { | 168 | foreach (DictionaryEntry dentry in attachs) |
157 | Data["_ap_" + kvp.Key] = kvp.Value["item"].ToString(); | 169 | { |
158 | } | 170 | if (dentry.Value != null) |
171 | { | ||
172 | Hashtable tab = (Hashtable)dentry.Value; | ||
173 | if (tab.ContainsKey("item") && tab["item"] != null) | ||
174 | Data["_ap_" + dentry.Key] = tab["item"].ToString(); | ||
175 | } | ||
176 | } | ||
159 | } | 177 | } |
160 | 178 | ||
161 | public AvatarAppearance ToAvatarAppearance() | 179 | public AvatarAppearance ToAvatarAppearance(UUID owner) |
162 | { | 180 | { |
163 | AvatarAppearance appearance = new AvatarAppearance(); | 181 | AvatarAppearance appearance = new AvatarAppearance(owner); |
164 | // Wearables | 182 | try |
165 | appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); | ||
166 | appearance.BodyItem = UUID.Parse(Data["BodyItem"]); | ||
167 | appearance.EyesItem = UUID.Parse(Data["EyesItem"]); | ||
168 | appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); | ||
169 | appearance.HairItem = UUID.Parse(Data["HairItem"]); | ||
170 | //appearance.HipOffset = float.Parse(Data["HipOffset"]); | ||
171 | appearance.JacketItem = UUID.Parse(Data["JacketItem"]); | ||
172 | appearance.Owner = UUID.Parse(Data["Owner"]); | ||
173 | appearance.PantsItem = UUID.Parse(Data["PantsItem"]); | ||
174 | appearance.Serial = Int32.Parse(Data["Serial"]); | ||
175 | appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); | ||
176 | appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); | ||
177 | appearance.SkinItem = UUID.Parse(Data["SkinItem"]); | ||
178 | appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); | ||
179 | appearance.SocksItem = UUID.Parse(Data["SocksItem"]); | ||
180 | appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); | ||
181 | appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); | ||
182 | |||
183 | // Attachments | ||
184 | Dictionary<string, string> attchs = new Dictionary<string, string>(); | ||
185 | foreach (KeyValuePair<string, string> _kvp in Data) | ||
186 | if (_kvp.Key.StartsWith("_ap_")) | ||
187 | attchs[_kvp.Key] = _kvp.Value; | ||
188 | Hashtable aaAttachs = new Hashtable(); | ||
189 | foreach (KeyValuePair<string, string> _kvp in attchs) | ||
190 | { | 183 | { |
191 | string pointStr = _kvp.Key.Substring(4); | 184 | appearance.Serial = Int32.Parse(Data["Serial"]); |
192 | int point = 0; | 185 | |
193 | if (!Int32.TryParse(pointStr, out point)) | 186 | // Wearables |
194 | continue; | 187 | appearance.BodyItem = UUID.Parse(Data["BodyItem"]); |
195 | Hashtable tmp = new Hashtable(); | 188 | appearance.EyesItem = UUID.Parse(Data["EyesItem"]); |
196 | tmp["item"] = _kvp.Value; | 189 | appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); |
197 | tmp["asset"] = UUID.Zero.ToString(); | 190 | appearance.HairItem = UUID.Parse(Data["HairItem"]); |
198 | aaAttachs[point] = tmp; | 191 | appearance.JacketItem = UUID.Parse(Data["JacketItem"]); |
192 | appearance.PantsItem = UUID.Parse(Data["PantsItem"]); | ||
193 | appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); | ||
194 | appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); | ||
195 | appearance.SkinItem = UUID.Parse(Data["SkinItem"]); | ||
196 | appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); | ||
197 | appearance.SocksItem = UUID.Parse(Data["SocksItem"]); | ||
198 | appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); | ||
199 | appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); | ||
200 | |||
201 | appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); | ||
202 | appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); | ||
203 | appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); | ||
204 | appearance.HairAsset = UUID.Parse(Data["HairAsset"]); | ||
205 | appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); | ||
206 | appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); | ||
207 | appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); | ||
208 | appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); | ||
209 | appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); | ||
210 | appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); | ||
211 | appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); | ||
212 | appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); | ||
213 | appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); | ||
214 | |||
215 | // Attachments | ||
216 | Dictionary<string, string> attchs = new Dictionary<string, string>(); | ||
217 | foreach (KeyValuePair<string, string> _kvp in Data) | ||
218 | if (_kvp.Key.StartsWith("_ap_")) | ||
219 | attchs[_kvp.Key] = _kvp.Value; | ||
220 | Hashtable aaAttachs = new Hashtable(); | ||
221 | foreach (KeyValuePair<string, string> _kvp in attchs) | ||
222 | { | ||
223 | string pointStr = _kvp.Key.Substring(4); | ||
224 | int point = 0; | ||
225 | if (!Int32.TryParse(pointStr, out point)) | ||
226 | continue; | ||
227 | Hashtable tmp = new Hashtable(); | ||
228 | UUID uuid = UUID.Zero; | ||
229 | UUID.TryParse(_kvp.Value, out uuid); | ||
230 | tmp["item"] = uuid; | ||
231 | tmp["asset"] = UUID.Zero.ToString(); | ||
232 | aaAttachs[point] = tmp; | ||
233 | } | ||
234 | appearance.SetAttachments(aaAttachs); | ||
199 | } | 235 | } |
236 | catch { } | ||
200 | 237 | ||
201 | return appearance; | 238 | return appearance; |
202 | } | 239 | } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 32df16d..e9c18ec 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -375,7 +375,7 @@ namespace OpenSim.Services.LLLoginService | |||
375 | 375 | ||
376 | aCircuit.AgentID = account.PrincipalID; | 376 | aCircuit.AgentID = account.PrincipalID; |
377 | if (avatar != null) | 377 | if (avatar != null) |
378 | aCircuit.Appearance = avatar.ToAvatarAppearance(); | 378 | aCircuit.Appearance = avatar.ToAvatarAppearance(account.PrincipalID); |
379 | //aCircuit.BaseFolder = irrelevant | 379 | //aCircuit.BaseFolder = irrelevant |
380 | aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | 380 | aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); |
381 | aCircuit.child = false; // the first login agent is root | 381 | aCircuit.child = false; // the first login agent is root |
diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index feca115..277d05a 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini | |||
@@ -20,6 +20,7 @@ | |||
20 | PresenceServices = "LocalPresenceServicesConnector" | 20 | PresenceServices = "LocalPresenceServicesConnector" |
21 | UserAccountServices = "LocalUserAccountServicesConnector" | 21 | UserAccountServices = "LocalUserAccountServicesConnector" |
22 | SimulationServices = "RemoteSimulationConnectorModule" | 22 | SimulationServices = "RemoteSimulationConnectorModule" |
23 | AvatarServices = "LocalAvatarServicesConnector"; | ||
23 | InventoryServiceInConnector = true | 24 | InventoryServiceInConnector = true |
24 | AssetServiceInConnector = true | 25 | AssetServiceInConnector = true |
25 | HGAuthServiceInConnector = true | 26 | HGAuthServiceInConnector = true |
@@ -44,6 +45,10 @@ | |||
44 | LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" | 45 | LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" |
45 | HypergridInventoryService = "OpenSim.Services.Connectors.dll:HGInventoryServiceConnector" | 46 | HypergridInventoryService = "OpenSim.Services.Connectors.dll:HGInventoryServiceConnector" |
46 | 47 | ||
48 | [AvatarService] | ||
49 | ; For the InventoryServiceInConnector | ||
50 | LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService" | ||
51 | |||
47 | [LibraryService] | 52 | [LibraryService] |
48 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" | 53 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" |
49 | LibraryName = "OpenSim Library" | 54 | LibraryName = "OpenSim Library" |
@@ -79,6 +84,7 @@ | |||
79 | InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" | 84 | InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" |
80 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | 85 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" |
81 | GridService = "OpenSim.Services.GridService.dll:GridService" | 86 | GridService = "OpenSim.Services.GridService.dll:GridService" |
87 | AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" | ||
82 | 88 | ||
83 | DefaultRegion = "OpenSim Test" | 89 | DefaultRegion = "OpenSim Test" |
84 | WelcomeMessage = "Welcome, Avatar!" | 90 | WelcomeMessage = "Welcome, Avatar!" |