From 070047ce1bc74cceebd5e817a0e042a7390c5f24 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 26 Oct 2007 14:08:36 +0000 Subject: * Added prototypical AvatarFactory module interface to load avatar parameters * Added dump_assets_to_file option to enable asset dumping for debug * normalized some namespaces * InventoryFolder renamed to InventoryFolderImpl to --- OpenSim/Region/Environment/Scenes/Scene.cs | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 69c3f9e..e86562d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -50,6 +50,7 @@ using OpenSim.Region.Environment.Types; using OpenSim.Region.Physics.Manager; using OpenSim.Region.Terrain; using Timer = System.Timers.Timer; +using OpenSim.Region.Environment.Modules; namespace OpenSim.Region.Environment.Scenes { @@ -90,11 +91,11 @@ namespace OpenSim.Region.Environment.Scenes public IXfer XferManager; - private IHttpRequests m_httpRequestModule = null; - private ISimChat m_simChatModule = null; - private IXMLRPC m_xmlrpcModule = null; - private IWorldComm m_worldCommModule = null; - + private IHttpRequests m_httpRequestModule; + private ISimChat m_simChatModule; + private IXMLRPC m_xmlrpcModule; + private IWorldComm m_worldCommModule; + private IAvatarFactory m_AvatarFactory; // Central Update Loop @@ -165,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, - ModuleLoader moduleLoader) + ModuleLoader moduleLoader, bool dumpAssetsToFile) { updateLock = new Mutex(false); @@ -205,6 +206,7 @@ namespace OpenSim.Region.Environment.Scenes ScenePresence.LoadAnims(); httpListener = httpServer; + m_dumpAssetsToFile = dumpAssetsToFile; } #endregion @@ -215,7 +217,6 @@ namespace OpenSim.Region.Environment.Scenes m_httpRequestModule = RequestModuleInterface(); m_xmlrpcModule = RequestModuleInterface(); m_worldCommModule = RequestModuleInterface(); - XferManager = RequestModuleInterface(); } @@ -855,7 +856,15 @@ namespace OpenSim.Region.Environment.Scenes { ScenePresence newAvatar = null; - newAvatar = new ScenePresence(client, this, m_regInfo); + byte[] visualParams; + AvatarWearable[] wearables; + + if( m_AvatarFactory == null || !m_AvatarFactory.TryGetIntialAvatarAppearance( client.AgentId, out wearables, out visualParams)) + { + AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams); + } + + newAvatar = new ScenePresence(client, this, m_regInfo, visualParams, wearables); newAvatar.IsChildAgent = child; if (child) @@ -1096,7 +1105,8 @@ namespace OpenSim.Region.Environment.Scenes //Console.WriteLine("new user, so creating caps handler for it"); Caps cap = new Caps(commsManager.AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, - agent.CapsPath, agent.AgentID); + agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); + Util.SetCapsURL(agent.AgentID, "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + "/CAPS/" + agent.CapsPath + "0000/"); @@ -1456,6 +1466,7 @@ namespace OpenSim.Region.Environment.Scenes #region Script Engine private List ScriptEngines = new List(); + private bool m_dumpAssetsToFile; public void AddScriptEngine(ScriptEngineInterface ScriptEngine, LogBase m_logger) { -- cgit v1.1