aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 67256ee..0826a08 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); 75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime)));
76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); 76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime)));
77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures); 77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures);
78 78
79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); 79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime);
80 } 80 }
81 81
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
166 } 166 }
167 167
168 /// <summary> 168 /// <summary>
169 /// Set appearance data (texture asset IDs and slider settings) 169 /// Set appearance data (texture asset IDs and slider settings)
170 /// </summary> 170 /// </summary>
171 /// <param name="sp"></param> 171 /// <param name="sp"></param>
172 /// <param name="texture"></param> 172 /// <param name="texture"></param>
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
190 { 190 {
191 changed = sp.Appearance.SetVisualParams(visualParams); 191 changed = sp.Appearance.SetVisualParams(visualParams);
192 } 192 }
193 193
194 // Process the baked texture array 194 // Process the baked texture array
195 if (textureEntry != null) 195 if (textureEntry != null)
196 { 196 {
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems; 267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems;
268 //foreach (WearableCacheItem item in items) 268 //foreach (WearableCacheItem item in items)
269 //{ 269 //{
270 270
271 //} 271 //}
272 return items; 272 return items;
273 } 273 }
@@ -468,7 +468,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
468 } 468 }
469 469
470 sp.Appearance.WearableCacheItems = wearableCache; 470 sp.Appearance.WearableCacheItems = wearableCache;
471 471
472 if (missing.Count > 0) 472 if (missing.Count > 0)
473 { 473 {
474 foreach (UUID id in missing) 474 foreach (UUID id in missing)
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) 493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++)
494 { 494 {
495 int j = AvatarAppearance.BAKE_INDICES[iter]; 495 int j = AvatarAppearance.BAKE_INDICES[iter];
496 m_log.Debug("[UpdateBCache] {" + iter + "/" + 496 m_log.Debug("[UpdateBCache] {" + iter + "/" +
497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" + 497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" +
498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" + 498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" +
499 sp.Appearance.WearableCacheItems[j].TextureID); 499 sp.Appearance.WearableCacheItems[j].TextureID);
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
588 wearableCacheValid = false; 588 wearableCacheValid = false;
589 } 589 }
590 } 590 }
591 591
592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1)); 592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1));
593 if (wearableCacheValid) 593 if (wearableCacheValid)
594 m_log.Debug("[ValidateBakedCache] have valid local cache"); 594 m_log.Debug("[ValidateBakedCache] have valid local cache");
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
601 if (!wearableCacheValid) 601 if (!wearableCacheValid)
602 { 602 {
603 hits = 0; 603 hits = 0;
604 // only use external bake module on login condition check 604 // only use external bake module on login condition check
605// ScenePresence ssp = null; 605// ScenePresence ssp = null;
606// if (sp is ScenePresence) 606// if (sp is ScenePresence)
607 { 607 {
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
816 foreach (KeyValuePair<UUID, long> kvp in saves) 816 foreach (KeyValuePair<UUID, long> kvp in saves)
817 { 817 {
818 // We have to load the key and value into local parameters to avoid a race condition if we loop 818 // We have to load the key and value into local parameters to avoid a race condition if we loop
819 // around and load kvp with a different value before FireAndForget has launched its thread. 819 // around and load kvp with a different value before FireAndForget has launched its thread.
820 UUID avatarID = kvp.Key; 820 UUID avatarID = kvp.Key;
821 long sendTime = kvp.Value; 821 long sendTime = kvp.Value;
822 822
@@ -869,13 +869,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
869 869
870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); 870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance);
871 871
872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting. 872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting.
873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes). 873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes).
874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); 874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp);
875 } 875 }
876 876
877 /// <summary> 877 /// <summary>
878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to 878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to
879 /// appearance data. 879 /// appearance data.
880 /// </summary> 880 /// </summary>
881 /// <param name='userID'></param> 881 /// <param name='userID'></param>
@@ -893,7 +893,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
893 if (appearance.Wearables[i][j].ItemID == UUID.Zero) 893 if (appearance.Wearables[i][j].ItemID == UUID.Zero)
894 { 894 {
895 m_log.WarnFormat( 895 m_log.WarnFormat(
896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.", 896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.",
897 i, j, userID); 897 i, j, userID);
898 898
899 continue; 899 continue;
@@ -967,7 +967,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
967// case WearableType.Skin: 967// case WearableType.Skin:
968// //case WearableType.Underpants: 968// //case WearableType.Underpants:
969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
970// 970//
971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i); 971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i);
972// resetwearable = true; 972// resetwearable = true;
973// break; 973// break;
@@ -975,7 +975,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
975// } 975// }
976// continue; 976// continue;
977// } 977// }
978// 978//
979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); 979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
980// baseItem = invService.GetItem(baseItem); 980// baseItem = invService.GetItem(baseItem);
981// 981//
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1002// 1002//
1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
1004// resetwearable = true; 1004// resetwearable = true;
1005// 1005//
1006// } 1006// }
1007// } 1007// }
1008// } 1008// }
@@ -1011,7 +1011,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1011// if (appearance.Wearables[(int) WearableType.Eyes] == null) 1011// if (appearance.Wearables[(int) WearableType.Eyes] == null)
1012// { 1012// {
1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes)); 1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes));
1014// 1014//
1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); 1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance);
1016// resetwearable = true; 1016// resetwearable = true;
1017// } 1017// }
@@ -1213,7 +1213,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId); 1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId);
1214 }, null, "AvatarFactoryModule.OnClientRequestWearables"); 1214 }, null, "AvatarFactoryModule.OnClientRequestWearables");
1215 } 1215 }
1216 1216
1217 /// <summary> 1217 /// <summary>
1218 /// Set appearance data (texture asset IDs and slider settings) received from a client 1218 /// Set appearance data (texture asset IDs and slider settings) received from a client
1219 /// </summary> 1219 /// </summary>
@@ -1299,12 +1299,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1299 { 1299 {
1300 UUID texture = UUID.Zero; 1300 UUID texture = UUID.Zero;
1301 int index = request.BakedTextureIndex; 1301 int index = request.BakedTextureIndex;
1302 1302
1303 if (m_reusetextures) 1303 if (m_reusetextures)
1304 { 1304 {
1305 // this is the most insanely dumb way to do this... however it seems to 1305 // this is the most insanely dumb way to do this... however it seems to
1306 // actually work. if the appearance has been reset because wearables have 1306 // actually work. if the appearance has been reset because wearables have
1307 // changed then the texture entries are zero'd out until the bakes are 1307 // changed then the texture entries are zero'd out until the bakes are
1308 // uploaded. on login, if the textures exist in the cache (eg if you logged 1308 // uploaded. on login, if the textures exist in the cache (eg if you logged
1309 // into the simulator recently, then the appearance will pull those and send 1309 // into the simulator recently, then the appearance will pull those and send
1310 // them back in the packet and you won't have to rebake. if the textures aren't 1310 // them back in the packet and you won't have to rebake. if the textures aren't
@@ -1320,7 +1320,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1320 1320
1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index); 1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index);
1322 } 1322 }
1323 1323
1324 CachedTextureResponseArg response = new CachedTextureResponseArg(); 1324 CachedTextureResponseArg response = new CachedTextureResponseArg();
1325 response.BakedTextureIndex = index; 1325 response.BakedTextureIndex = index;
1326 response.BakedTextureID = texture; 1326 response.BakedTextureID = texture;
@@ -1328,7 +1328,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1328 1328
1329 cachedTextureResponse.Add(response); 1329 cachedTextureResponse.Add(response);
1330 } 1330 }
1331 1331
1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial); 1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial);
1333 // The serial number appears to be used to match requests and responses 1333 // The serial number appears to be used to match requests and responses
1334 // in the texture transaction. We just send back the serial number 1334 // in the texture transaction. We just send back the serial number