diff options
* 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
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 29 |
1 files changed, 20 insertions, 9 deletions
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; | |||
50 | using OpenSim.Region.Physics.Manager; | 50 | using OpenSim.Region.Physics.Manager; |
51 | using OpenSim.Region.Terrain; | 51 | using OpenSim.Region.Terrain; |
52 | using Timer = System.Timers.Timer; | 52 | using Timer = System.Timers.Timer; |
53 | using OpenSim.Region.Environment.Modules; | ||
53 | 54 | ||
54 | namespace OpenSim.Region.Environment.Scenes | 55 | namespace OpenSim.Region.Environment.Scenes |
55 | { | 56 | { |
@@ -90,11 +91,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
90 | 91 | ||
91 | public IXfer XferManager; | 92 | public IXfer XferManager; |
92 | 93 | ||
93 | private IHttpRequests m_httpRequestModule = null; | 94 | private IHttpRequests m_httpRequestModule; |
94 | private ISimChat m_simChatModule = null; | 95 | private ISimChat m_simChatModule; |
95 | private IXMLRPC m_xmlrpcModule = null; | 96 | private IXMLRPC m_xmlrpcModule; |
96 | private IWorldComm m_worldCommModule = null; | 97 | private IWorldComm m_worldCommModule; |
97 | 98 | private IAvatarFactory m_AvatarFactory; | |
98 | 99 | ||
99 | // Central Update Loop | 100 | // Central Update Loop |
100 | 101 | ||
@@ -165,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
165 | 166 | ||
166 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, | 167 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, |
167 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, | 168 | AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, |
168 | ModuleLoader moduleLoader) | 169 | ModuleLoader moduleLoader, bool dumpAssetsToFile) |
169 | { | 170 | { |
170 | updateLock = new Mutex(false); | 171 | updateLock = new Mutex(false); |
171 | 172 | ||
@@ -205,6 +206,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
205 | ScenePresence.LoadAnims(); | 206 | ScenePresence.LoadAnims(); |
206 | 207 | ||
207 | httpListener = httpServer; | 208 | httpListener = httpServer; |
209 | m_dumpAssetsToFile = dumpAssetsToFile; | ||
208 | } | 210 | } |
209 | 211 | ||
210 | #endregion | 212 | #endregion |
@@ -215,7 +217,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
215 | m_httpRequestModule = RequestModuleInterface<IHttpRequests>(); | 217 | m_httpRequestModule = RequestModuleInterface<IHttpRequests>(); |
216 | m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); | 218 | m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); |
217 | m_worldCommModule = RequestModuleInterface<IWorldComm>(); | 219 | m_worldCommModule = RequestModuleInterface<IWorldComm>(); |
218 | |||
219 | XferManager = RequestModuleInterface<IXfer>(); | 220 | XferManager = RequestModuleInterface<IXfer>(); |
220 | } | 221 | } |
221 | 222 | ||
@@ -855,7 +856,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
855 | { | 856 | { |
856 | ScenePresence newAvatar = null; | 857 | ScenePresence newAvatar = null; |
857 | 858 | ||
858 | newAvatar = new ScenePresence(client, this, m_regInfo); | 859 | byte[] visualParams; |
860 | AvatarWearable[] wearables; | ||
861 | |||
862 | if( m_AvatarFactory == null || !m_AvatarFactory.TryGetIntialAvatarAppearance( client.AgentId, out wearables, out visualParams)) | ||
863 | { | ||
864 | AvatarFactoryModule.GetDefaultAvatarAppearance(out wearables, out visualParams); | ||
865 | } | ||
866 | |||
867 | newAvatar = new ScenePresence(client, this, m_regInfo, visualParams, wearables); | ||
859 | newAvatar.IsChildAgent = child; | 868 | newAvatar.IsChildAgent = child; |
860 | 869 | ||
861 | if (child) | 870 | if (child) |
@@ -1096,7 +1105,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1096 | //Console.WriteLine("new user, so creating caps handler for it"); | 1105 | //Console.WriteLine("new user, so creating caps handler for it"); |
1097 | Caps cap = | 1106 | Caps cap = |
1098 | new Caps(commsManager.AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, | 1107 | new Caps(commsManager.AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port, |
1099 | agent.CapsPath, agent.AgentID); | 1108 | agent.CapsPath, agent.AgentID, m_dumpAssetsToFile); |
1109 | |||
1100 | Util.SetCapsURL(agent.AgentID, | 1110 | Util.SetCapsURL(agent.AgentID, |
1101 | "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + | 1111 | "http://" + m_regInfo.ExternalHostName + ":" + httpListener.Port.ToString() + |
1102 | "/CAPS/" + agent.CapsPath + "0000/"); | 1112 | "/CAPS/" + agent.CapsPath + "0000/"); |
@@ -1456,6 +1466,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1456 | #region Script Engine | 1466 | #region Script Engine |
1457 | 1467 | ||
1458 | private List<ScriptEngineInterface> ScriptEngines = new List<ScriptEngineInterface>(); | 1468 | private List<ScriptEngineInterface> ScriptEngines = new List<ScriptEngineInterface>(); |
1469 | private bool m_dumpAssetsToFile; | ||
1459 | 1470 | ||
1460 | public void AddScriptEngine(ScriptEngineInterface ScriptEngine, LogBase m_logger) | 1471 | public void AddScriptEngine(ScriptEngineInterface ScriptEngine, LogBase m_logger) |
1461 | { | 1472 | { |