mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 10:46:00 +08:00
Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of scene presence by client ID.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
|
||||
protected IAvatarFactory m_avatarFactory;
|
||||
protected IAvatarFactoryModule m_avatarFactory;
|
||||
|
||||
public string Name { get { return "Appearance Information Module"; } }
|
||||
|
||||
@@ -106,14 +106,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||
{
|
||||
foreach (Scene scene in m_scenes.Values)
|
||||
{
|
||||
scene.ForEachClient(
|
||||
delegate(IClientAPI client)
|
||||
scene.ForEachScenePresence(
|
||||
delegate(ScenePresence sp)
|
||||
{
|
||||
if (client is LLClientView && !((LLClientView)client).ChildAgentStatus())
|
||||
if (sp.ControllingClient is LLClientView && !((LLClientView)sp.ControllingClient).ChildAgentStatus())
|
||||
{
|
||||
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(client);
|
||||
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"{0} baked appearance texture is {1}", client.Name, bakedTextureValid ? "OK" : "corrupt");
|
||||
"{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
sp.Appearance = npcAppearance;
|
||||
scene.AttachmentsModule.RezAttachments(sp);
|
||||
|
||||
IAvatarFactory module = scene.RequestModuleInterface<IAvatarFactory>();
|
||||
IAvatarFactoryModule module = scene.RequestModuleInterface<IAvatarFactoryModule>();
|
||||
module.SendAppearance(sp.UUID);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
// ScenePresence.SendInitialData() to reset our entire appearance.
|
||||
scene.AssetService.Store(AssetHelpers.CreateAsset(originalFace8TextureId));
|
||||
|
||||
afm.SetAppearanceFromClient(sp.ControllingClient, originalTe, null);
|
||||
afm.SetAppearance(sp, originalTe, null);
|
||||
|
||||
INPCModule npcModule = scene.RequestModuleInterface<INPCModule>();
|
||||
UUID npcId = npcModule.CreateNPC("John", "Smith", new Vector3(128, 128, 30), scene, sp.Appearance);
|
||||
|
||||
Reference in New Issue
Block a user