aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/RegionApplicationBase.cs
diff options
context:
space:
mode:
authorMW2009-03-02 16:33:11 +0000
committerMW2009-03-02 16:33:11 +0000
commit3c46ee93269cbb7944442f5de23bb10cf77bf9af (patch)
treedfe78dabcf2c907db29254ed114d46d36729e740 /OpenSim/Region/ClientStack/RegionApplicationBase.cs
parentChanged IClientNetworkServer.AddScene method from void AddScene(Scene x) to v... (diff)
downloadopensim-SC_OLD-3c46ee93269cbb7944442f5de23bb10cf77bf9af.zip
opensim-SC_OLD-3c46ee93269cbb7944442f5de23bb10cf77bf9af.tar.gz
opensim-SC_OLD-3c46ee93269cbb7944442f5de23bb10cf77bf9af.tar.bz2
opensim-SC_OLD-3c46ee93269cbb7944442f5de23bb10cf77bf9af.tar.xz
Moved the SetupScene methods from RegionApplicationBase to OpenSimBase [Do we really still need RegionApplicationBase?]
Added a flag (bool m_autoCreateLindenStack = true) which says if the ClientStack will be autocreated and initialised when creating regions. This helps with moving ClientStacks to Region modules. Currently this flag is hardcoded to true, as it is only for testing at the moment, so you need to change the value in the code if you want to turn off auto creating.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs81
1 files changed, 0 insertions, 81 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 731e0e5..c1c212c 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -141,86 +141,5 @@ namespace OpenSim.Region.ClientStack
141 141
142 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); 142 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
143 } 143 }
144
145 /// <summary>
146 /// Create a scene and its initial base structures.
147 /// </summary>
148 /// <param name="regionInfo"></param>
149 /// <param name="clientServer"> </param>
150 /// <returns></returns>
151 protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer)
152 {
153 return SetupScene(regionInfo, 0, null, out clientServer);
154 }
155
156 /// <summary>
157 /// Create a scene and its initial base structures.
158 /// </summary>
159 /// TODO: Really configSource shouldn't be passed in here, but should be moved up to BaseOpenSimServer and
160 /// made common to all the servers.
161 ///
162 /// <param name="regionInfo"></param>
163 /// <param name="proxyOffset"></param>
164 /// <param name="configSource"></param>
165 /// <param name="clientServer"> </param>
166 /// <returns></returns>
167 protected Scene SetupScene(
168 RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out IClientNetworkServer clientServer)
169 {
170 AgentCircuitManager circuitManager = new AgentCircuitManager();
171 IPAddress listenIP = regionInfo.InternalEndPoint.Address;
172 //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
173 // listenIP = IPAddress.Parse("0.0.0.0");
174
175 uint port = (uint) regionInfo.InternalEndPoint.Port;
176
177 clientServer
178 = m_clientStackManager.CreateServer(
179 listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource,
180 m_assetCache, circuitManager);
181
182 regionInfo.InternalEndPoint.Port = (int)port;
183
184 Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
185
186 clientServer.AddScene(scene);
187
188 scene.LoadWorldMap();
189
190 scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
191 scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
192 scene.PhysicsScene.SetWaterLevel((float)regionInfo.RegionSettings.WaterHeight);
193
194 // TODO: Remove this cruft once MasterAvatar is fully deprecated
195 //Master Avatar Setup
196 UserProfileData masterAvatar;
197 if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero)
198 {
199 masterAvatar =
200 m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName,
201 scene.RegionInfo.MasterAvatarLastName,
202 scene.RegionInfo.MasterAvatarSandboxPassword);
203 }
204 else
205 {
206 masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
207 scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
208 scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName;
209 }
210
211 if (masterAvatar == null)
212 {
213 m_log.Info("[PARCEL]: No master avatar found, using null.");
214 scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero;
215 }
216 else
217 {
218 m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]",
219 scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName);
220 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID;
221 }
222
223 return scene;
224 }
225 } 144 }
226} 145}