aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-01-11 17:30:05 -0800
committerDiva Canto2010-01-11 17:30:05 -0800
commit77e43f480154b0a950d9d5f54df5c225fc64e77a (patch)
tree48f1806bd8b0d0f50aef89846bcc186d3ad3eb74 /OpenSim/Region
parentThis fixes the problem that region modules (new style) weren't being recognized. (diff)
downloadopensim-SC_OLD-77e43f480154b0a950d9d5f54df5c225fc64e77a.zip
opensim-SC_OLD-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.gz
opensim-SC_OLD-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.bz2
opensim-SC_OLD-77e43f480154b0a950d9d5f54df5c225fc64e77a.tar.xz
Fixed a couple of bugs with Appearance. Appearance is all good now.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs1
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs17
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs2
9 files changed, 26 insertions, 19 deletions
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