aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorDan Lake2011-10-19 14:41:44 -0700
committerDan Lake2011-10-19 14:41:44 -0700
commitda794f34a56f7c88904315ae538de8f3790e6891 (patch)
treeec15f9ad1a941441ab2c0cd24f50b7636bba7bce /OpenSim/Region/OptionalModules
parentAdd "scripts stop" and "scripts start" console commands. (diff)
downloadopensim-SC_OLD-da794f34a56f7c88904315ae538de8f3790e6891.zip
opensim-SC_OLD-da794f34a56f7c88904315ae538de8f3790e6891.tar.gz
opensim-SC_OLD-da794f34a56f7c88904315ae538de8f3790e6891.tar.bz2
opensim-SC_OLD-da794f34a56f7c88904315ae538de8f3790e6891.tar.xz
Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of scene presence by client ID.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs12
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs2
3 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 77e7acf..2cef8a9 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 53 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
54 protected IAvatarFactory m_avatarFactory; 54 protected IAvatarFactoryModule m_avatarFactory;
55 55
56 public string Name { get { return "Appearance Information Module"; } } 56 public string Name { get { return "Appearance Information Module"; } }
57 57
@@ -106,14 +106,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
106 { 106 {
107 foreach (Scene scene in m_scenes.Values) 107 foreach (Scene scene in m_scenes.Values)
108 { 108 {
109 scene.ForEachClient( 109 scene.ForEachScenePresence(
110 delegate(IClientAPI client) 110 delegate(ScenePresence sp)
111 { 111 {
112 if (client is LLClientView && !((LLClientView)client).ChildAgentStatus()) 112 if (sp.ControllingClient is LLClientView && !((LLClientView)sp.ControllingClient).ChildAgentStatus())
113 { 113 {
114 bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(client); 114 bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
115 MainConsole.Instance.OutputFormat( 115 MainConsole.Instance.OutputFormat(
116 "{0} baked appearance texture is {1}", client.Name, bakedTextureValid ? "OK" : "corrupt"); 116 "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt");
117 } 117 }
118 }); 118 });
119 } 119 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index e94ed85..10181aa 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
84 sp.Appearance = npcAppearance; 84 sp.Appearance = npcAppearance;
85 scene.AttachmentsModule.RezAttachments(sp); 85 scene.AttachmentsModule.RezAttachments(sp);
86 86
87 IAvatarFactory module = scene.RequestModuleInterface<IAvatarFactory>(); 87 IAvatarFactoryModule module = scene.RequestModuleInterface<IAvatarFactoryModule>();
88 module.SendAppearance(sp.UUID); 88 module.SendAppearance(sp.UUID);
89 89
90 return true; 90 return true;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index be1ecd0..ce8d1db 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
106 // ScenePresence.SendInitialData() to reset our entire appearance. 106 // ScenePresence.SendInitialData() to reset our entire appearance.
107 scene.AssetService.Store(AssetHelpers.CreateAsset(originalFace8TextureId)); 107 scene.AssetService.Store(AssetHelpers.CreateAsset(originalFace8TextureId));
108 108
109 afm.SetAppearanceFromClient(sp.ControllingClient, originalTe, null); 109 afm.SetAppearance(sp, originalTe, null);
110 110
111 INPCModule npcModule = scene.RequestModuleInterface<INPCModule>(); 111 INPCModule npcModule = scene.RequestModuleInterface<INPCModule>();
112 UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, sp.Appearance); 112 UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, sp.Appearance);