From bfd36e2e836f92539e68bba077104d5016c5bf8b Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 4 Sep 2007 13:43:56 +0000 Subject: Some work on Module loading/management. Some more modules templates classes (hoping that someone will pick some of these and work on implementing them). Early version of the "Dynamic Texture Module", although currently there are no render modules included (so not really functional without them). Added osSetDynamicTextureURL script function, for attaching a dynamic texture to a prim. Some work on the console command handling. Added "change-region " and "exit-region" so that after the use of change-region, the commands entered will apply to that region only. Then use exit-region to return to the top level (so commands then function as they did before and either apply to all regions or to the first region) (Note: this hasn't been tested very much) --- OpenSim/Region/Examples/SimpleApp/Program.cs | 30 +++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs') diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index a1d331d..52e279b 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Net; using libsecondlife; using OpenSim.Framework; @@ -22,6 +23,7 @@ namespace SimpleApp { class Program : RegionApplicationBase, conscmd_callback { + private ModuleLoader m_moduleLoader; protected override LogBase CreateLog() { return new LogBase(null, "SimpleApp", this, false); @@ -59,8 +61,19 @@ namespace SimpleApp UDPServer udpServer; + m_moduleLoader = new ModuleLoader(); + m_moduleLoader.LoadDefaultSharedModules(""); + Scene scene = SetupScene(regionInfo, out udpServer); + + m_moduleLoader.InitialiseSharedModules(scene); + m_moduleLoader.CreateDefaultModules(scene, ""); + scene.SetModuleInterfaces(); + scene.StartTimer(); + + m_moduleLoader.PostInitialise(); + m_moduleLoader.ClearCache(); udpServer.ServerListener(); @@ -75,10 +88,21 @@ namespace SimpleApp ComplexObject complexObject = new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + posOffset ); scene.AddEntity(complexObject); } - - MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager); - scene.AddNewClient(m_character, false); + + /*for (int i = 0; i < 500; i++) + { + MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager); + scene.AddNewClient(m_character, false); + } + + List avatars = scene.RequestAvatarList(); + foreach (ScenePresence avatar in avatars) + { + avatar.AbsolutePosition = new LLVector3((float)OpenSim.Framework.Utilities.Util.RandomClass.Next(100,200), (float)OpenSim.Framework.Utilities.Util.RandomClass.Next(30, 200), 2); + + }*/ + DirectoryInfo dirInfo = new DirectoryInfo( "." ); float x = 0; -- cgit v1.1