aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorlbsa712007-07-01 21:16:45 +0000
committerlbsa712007-07-01 21:16:45 +0000
commit2d34caabb9e3c346602566f7724c5e21014ed4ed (patch)
treedef5cd87149c426a955f0db27298a4669f4f61c7 /OpenSim/Region
parentMore work on SceneObject/Primitive and building (Linking is a work in progres... (diff)
downloadopensim-SC_OLD-2d34caabb9e3c346602566f7724c5e21014ed4ed.zip
opensim-SC_OLD-2d34caabb9e3c346602566f7724c5e21014ed4ed.tar.gz
opensim-SC_OLD-2d34caabb9e3c346602566f7724c5e21014ed4ed.tar.bz2
opensim-SC_OLD-2d34caabb9e3c346602566f7724c5e21014ed4ed.tar.xz
* removed try-catchall from scene constructor
* added reference server-side addnewprim prototype to Scene - not implementet yet though.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs76
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs3
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs8
4 files changed, 52 insertions, 39 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 77058cc..059bfd7 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -103,40 +103,32 @@ namespace OpenSim.Region.Environment.Scenes
103 /// <param name="regionName">Region Name for this region</param> 103 /// <param name="regionName">Region Name for this region</param>
104 public Scene(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) 104 public Scene(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
105 { 105 {
106 try 106 updateLock = new Mutex(false);
107 { 107 this.authenticateHandler = authen;
108 updateLock = new Mutex(false); 108 this.commsManager = commsMan;
109 this.authenticateHandler = authen; 109 this.assetCache = assetCach;
110 this.commsManager = commsMan; 110 m_clientThreads = clientThreads;
111 this.assetCache = assetCach; 111 m_regInfo = regInfo;
112 m_clientThreads = clientThreads; 112 m_regionHandle = m_regInfo.RegionHandle;
113 m_regInfo = regInfo; 113 m_regionName = m_regInfo.RegionName;
114 m_regionHandle = m_regInfo.RegionHandle; 114 this.m_datastore = m_regInfo.DataStore;
115 m_regionName = m_regInfo.RegionName; 115 this.RegisterRegionWithComms();
116 this.m_datastore = m_regInfo.DataStore; 116
117 this.RegisterRegionWithComms(); 117 parcelManager = new ParcelManager(this, this.m_regInfo);
118 118 estateManager = new EstateManager(this, this.m_regInfo);
119 parcelManager = new ParcelManager(this, this.m_regInfo); 119 scriptManager = new ScriptManager(this);
120 estateManager = new EstateManager(this, this.m_regInfo); 120 eventManager = new EventManager();
121 scriptManager = new ScriptManager(this); 121
122 eventManager = new EventManager(); 122 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance");
123 123 Entities = new Dictionary<libsecondlife.LLUUID, EntityBase>();
124 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating new entitities instance"); 124 Avatars = new Dictionary<LLUUID, ScenePresence>();
125 Entities = new Dictionary<libsecondlife.LLUUID, EntityBase>(); 125 Prims = new Dictionary<LLUUID, SceneObject>();
126 Avatars = new Dictionary<LLUUID, ScenePresence>(); 126
127 Prims = new Dictionary<LLUUID, SceneObject>(); 127 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap");
128 128 Terrain = new TerrainEngine();
129 OpenSim.Framework.Console.MainLog.Instance.Verbose("World.cs - creating LandMap"); 129
130 Terrain = new TerrainEngine(); 130 ScenePresence.LoadAnims();
131 131 this.httpListener = httpServer;
132 ScenePresence.LoadAnims();
133 this.httpListener = httpServer;
134
135 }
136 catch (Exception e)
137 {
138 OpenSim.Framework.Console.MainLog.Instance.Error("World.cs: Constructor failed with exception " + e.ToString());
139 }
140 } 132 }
141 #endregion 133 #endregion
142 134
@@ -218,7 +210,7 @@ namespace OpenSim.Region.Environment.Scenes
218 /// <returns></returns> 210 /// <returns></returns>
219 public bool Backup() 211 public bool Backup()
220 { 212 {
221 213
222 return true; 214 return true;
223 } 215 }
224 #endregion 216 #endregion
@@ -432,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes
432 this._primCount++; 424 this._primCount++;
433 425
434 // Trigger event for listeners 426 // Trigger event for listeners
435 // eventManager.TriggerOnNewPrimitive(prim); 427 // eventManager.TriggerOnNewPrimitive(prim);
436 } 428 }
437 catch (Exception e) 429 catch (Exception e)
438 { 430 {
@@ -440,6 +432,13 @@ namespace OpenSim.Region.Environment.Scenes
440 } 432 }
441 } 433 }
442 434
435 public override uint AddNewPrim(LLUUID ownerId, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID texture, int flags)
436 {
437 uint id = NextLocalId;
438
439 throw new NotImplementedException("Not implemented yet.");
440 }
441
443 #endregion 442 #endregion
444 443
445 #region Add/Remove Avatar Methods 444 #region Add/Remove Avatar Methods
@@ -670,7 +669,7 @@ namespace OpenSim.Region.Environment.Scenes
670 agent.startpos = new LLVector3(128, 128, 70); 669 agent.startpos = new LLVector3(128, 128, 70);
671 agent.child = true; 670 agent.child = true;
672 this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); 671 this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent);
673 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint ); 672 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint);
674 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); 673 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort);
675 } 674 }
676 } 675 }
@@ -733,7 +732,7 @@ namespace OpenSim.Region.Environment.Scenes
733 this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); 732 this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
734 this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position); 733 this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
735 734
736 remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4)); 735 remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
737 736
738 } 737 }
739 //remoteClient.SendTeleportCancel(); 738 //remoteClient.SendTeleportCancel();
@@ -752,5 +751,6 @@ namespace OpenSim.Region.Environment.Scenes
752 } 751 }
753 752
754 #endregion 753 #endregion
754
755 } 755 }
756} 756}
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 00ab194..817f206 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -149,7 +149,9 @@ namespace OpenSim.Region.Environment.Scenes
149 /// <param name="agentID"></param> 149 /// <param name="agentID"></param>
150 /// <param name="child"></param> 150 /// <param name="child"></param>
151 public abstract void AddNewClient(IClientAPI client, bool child); 151 public abstract void AddNewClient(IClientAPI client, bool child);
152 152
153 public abstract uint AddNewPrim(LLUUID ownerId, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID texture, int flags);
154
153 /// <summary> 155 /// <summary>
154 /// 156 ///
155 /// </summary> 157 /// </summary>
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index fe1fc16..3ba9c77 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -78,6 +78,9 @@ namespace SimpleApp
78 pos, null); 78 pos, null);
79 79
80 client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); 80 client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
81
82
83
81 }; 84 };
82 85
83 client.SendRegionHandshake(m_regionInfo); 86 client.SendRegionHandshake(m_regionInfo);
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index f5c6999..8e9ad75 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -16,6 +16,7 @@ using OpenSim.Region.Communications.Local;
16using OpenSim.Region.ClientStack; 16using OpenSim.Region.ClientStack;
17using OpenSim.Region.Physics.BasicPhysicsPlugin; 17using OpenSim.Region.Physics.BasicPhysicsPlugin;
18using System.Net; 18using System.Net;
19using libsecondlife.Packets;
19 20
20namespace SimpleApp 21namespace SimpleApp
21{ 22{
@@ -23,6 +24,7 @@ namespace SimpleApp
23 { 24 {
24 private LogBase m_log; 25 private LogBase m_log;
25 AuthenticateSessionsBase m_circuitManager; 26 AuthenticateSessionsBase m_circuitManager;
27 uint m_localId;
26 28
27 private void Run() 29 private void Run()
28 { 30 {
@@ -65,6 +67,12 @@ namespace SimpleApp
65 67
66 m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit."); 68 m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit.");
67 m_log.ReadLine(); 69 m_log.ReadLine();
70
71 PrimData primData = new PrimData();
72 primData.Scale = new LLVector3(1, 1, 1);
73
74 m_localId = world.AddNewPrim( LLUUID.Zero, primData, LLVector3.Zero, new LLQuaternion(0, 0, 0, 0), LLUUID.Zero, 0);
75
68 } 76 }
69 77
70 private bool AddNewSessionHandler(ulong regionHandle, Login loginData) 78 private bool AddNewSessionHandler(ulong regionHandle, Login loginData)