aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs30
1 files changed, 27 insertions, 3 deletions
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 @@
1using System; 1using System;
2using System.Collections.Generic;
2using System.Net; 3using System.Net;
3using libsecondlife; 4using libsecondlife;
4using OpenSim.Framework; 5using OpenSim.Framework;
@@ -22,6 +23,7 @@ namespace SimpleApp
22{ 23{
23 class Program : RegionApplicationBase, conscmd_callback 24 class Program : RegionApplicationBase, conscmd_callback
24 { 25 {
26 private ModuleLoader m_moduleLoader;
25 protected override LogBase CreateLog() 27 protected override LogBase CreateLog()
26 { 28 {
27 return new LogBase(null, "SimpleApp", this, false); 29 return new LogBase(null, "SimpleApp", this, false);
@@ -59,8 +61,19 @@ namespace SimpleApp
59 61
60 UDPServer udpServer; 62 UDPServer udpServer;
61 63
64 m_moduleLoader = new ModuleLoader();
65 m_moduleLoader.LoadDefaultSharedModules("");
66
62 Scene scene = SetupScene(regionInfo, out udpServer); 67 Scene scene = SetupScene(regionInfo, out udpServer);
68
69 m_moduleLoader.InitialiseSharedModules(scene);
70 m_moduleLoader.CreateDefaultModules(scene, "");
71 scene.SetModuleInterfaces();
72
63 scene.StartTimer(); 73 scene.StartTimer();
74
75 m_moduleLoader.PostInitialise();
76 m_moduleLoader.ClearCache();
64 77
65 udpServer.ServerListener(); 78 udpServer.ServerListener();
66 79
@@ -75,10 +88,21 @@ namespace SimpleApp
75 ComplexObject complexObject = new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + posOffset ); 88 ComplexObject complexObject = new ComplexObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos + posOffset );
76 scene.AddEntity(complexObject); 89 scene.AddEntity(complexObject);
77 } 90 }
78 91
79 MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager); 92 /*for (int i = 0; i < 500; i++)
80 scene.AddNewClient(m_character, false); 93 {
94 MyNpcCharacter m_character = new MyNpcCharacter(scene.EventManager);
95 scene.AddNewClient(m_character, false);
96 }
97
98 List<ScenePresence> avatars = scene.RequestAvatarList();
99 foreach (ScenePresence avatar in avatars)
100 {
101 avatar.AbsolutePosition = new LLVector3((float)OpenSim.Framework.Utilities.Util.RandomClass.Next(100,200), (float)OpenSim.Framework.Utilities.Util.RandomClass.Next(30, 200), 2);
102
103 }*/
81 104
105
82 DirectoryInfo dirInfo = new DirectoryInfo( "." ); 106 DirectoryInfo dirInfo = new DirectoryInfo( "." );
83 107
84 float x = 0; 108 float x = 0;