aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/Program.cs
diff options
context:
space:
mode:
authorlbsa712007-07-14 15:33:25 +0000
committerlbsa712007-07-14 15:33:25 +0000
commit811d2b69c9c5d07dbb196cd2ee6353916d0b51c5 (patch)
treead6cb65aee221bdab5a0cd7deddb49950ba98241 /OpenSim/Region/Examples/SimpleApp/Program.cs
parent*Added support for prim counting on parcels (diff)
downloadopensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.zip
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.gz
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.bz2
opensim-SC-811d2b69c9c5d07dbb196cd2ee6353916d0b51c5.tar.xz
* Worked some more on SimpleApp
* Removed SceneObject references to RegionHandle, ParcelManager, EventManager as they are public on Scene * Moved PulseScript behaviour into MySceneObject
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/Program.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs50
1 files changed, 25 insertions, 25 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index f30f444..42a7add 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -13,7 +13,8 @@ using OpenSim.Region.Capabilities;
13using OpenSim.Region.ClientStack; 13using OpenSim.Region.ClientStack;
14using OpenSim.Region.Communications.Local; 14using OpenSim.Region.Communications.Local;
15using OpenSim.Region.GridInterfaces.Local; 15using OpenSim.Region.GridInterfaces.Local;
16using OpenSim.Framework.Data; 16using System.Timers;
17using OpenSim.Region.Environment.Scenes;
17 18
18namespace SimpleApp 19namespace SimpleApp
19{ 20{
@@ -23,16 +24,17 @@ namespace SimpleApp
23 AuthenticateSessionsBase m_circuitManager; 24 AuthenticateSessionsBase m_circuitManager;
24 uint m_localId; 25 uint m_localId;
25 public MyWorld world; 26 public MyWorld world;
27 private SceneObject m_sceneObject;
26 28
27 private void Run() 29 private void Run()
28 { 30 {
29 m_log = new LogBase(null, "SimpleApp", this, false); 31 m_log = new LogBase(null, "SimpleApp", this, false);
30 MainLog.Instance = m_log; 32 MainLog.Instance = m_log;
31 33
32 // CheckSumServer checksumServer = new CheckSumServer(12036); 34 // CheckSumServer checksumServer = new CheckSumServer(12036);
33 // checksumServer.ServerListener(); 35 // checksumServer.ServerListener();
34 36
35 IPEndPoint internalEndPoint = new IPEndPoint( IPAddress.Parse( "127.0.0.1" ), 9000 ); 37 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
36 38
37 m_circuitManager = new AuthenticateSessionsBase(); 39 m_circuitManager = new AuthenticateSessionsBase();
38 40
@@ -46,42 +48,40 @@ namespace SimpleApp
46 48
47 PhysicsManager physManager = new PhysicsManager(); 49 PhysicsManager physManager = new PhysicsManager();
48 physManager.LoadPlugins(); 50 physManager.LoadPlugins();
49 51
50 UDPServer udpServer = new UDPServer( internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager ); 52 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager);
51 PacketServer packetServer = new PacketServer(udpServer); 53 PacketServer packetServer = new PacketServer(udpServer);
52 54
53
54 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 55 ClientView.TerrainManager = new TerrainManager(new SecondLife());
55 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port); 56 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port);
56 57
57 NetworkServersInfo serverInfo = new NetworkServersInfo(); 58 NetworkServersInfo serverInfo = new NetworkServersInfo();
58 CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer); 59 CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer);
59 60
60 RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" ); 61 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "127.0.0.1");
61 62
62 world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); 63 world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer);
63 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null; 64 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null;
64 65
65 world.LoadWorldMap(); 66 world.LoadWorldMap();
66 67 world.ParcelManager.NoParcelDataFromStorage();
68
67 udpServer.LocalWorld = world; 69 udpServer.LocalWorld = world;
68 70
69 httpServer.Start(); 71 httpServer.Start();
70 udpServer.ServerListener(); 72 udpServer.ServerListener();
71 73
72 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test"); 74 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
73 if (masterAvatar != null) 75 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
74 { 76 LLVector3 pos = new LLVector3(129, 129, 27);
75 world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
76 world.ParcelManager.NoParcelDataFromStorage();
77 }
78 77
79 world.CustomStartup(); 78 m_sceneObject = new MySceneObject(world, LLUUID.Zero, world.PrimIDAllocate(), pos, shape);
80 m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit."); 79 world.AddNewEntity(m_sceneObject);
80
81 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
81 m_log.ReadLine(); 82 m_log.ReadLine();
82
83 } 83 }
84 84
85 private bool AddNewSessionHandler(ulong regionHandle, Login loginData) 85 private bool AddNewSessionHandler(ulong regionHandle, Login loginData)
86 { 86 {
87 m_log.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last); 87 m_log.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last);
@@ -101,15 +101,15 @@ namespace SimpleApp
101 101
102 return true; 102 return true;
103 } 103 }
104 104
105 #region IAssetReceiver Members 105 #region IAssetReceiver Members
106 106
107 public void AssetReceived( AssetBase asset, bool IsTexture) 107 public void AssetReceived(AssetBase asset, bool IsTexture)
108 { 108 {
109 throw new Exception("The method or operation is not implemented."); 109 throw new Exception("The method or operation is not implemented.");
110 } 110 }
111 111
112 public void AssetNotFound( AssetBase asset) 112 public void AssetNotFound(AssetBase asset)
113 { 113 {
114 throw new Exception("The method or operation is not implemented."); 114 throw new Exception("The method or operation is not implemented.");
115 } 115 }
@@ -134,7 +134,7 @@ namespace SimpleApp
134 { 134 {
135 Program app = new Program(); 135 Program app = new Program();
136 136
137 app.Run(); 137 app.Run();
138 } 138 }
139 } 139 }
140} 140}