aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs78
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs29
2 files changed, 30 insertions, 77 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f02160a..f69aabf 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1246,7 +1246,7 @@ namespace OpenSim.Region.Environment.Scenes
1246 } 1246 }
1247 #endregion 1247 #endregion
1248 1248
1249 private void forceClientUpdate() 1249 public void ForceClientUpdate()
1250 { 1250 {
1251 foreach (EntityBase ent in this.Entities.Values) 1251 foreach (EntityBase ent in this.Entities.Values)
1252 { 1252 {
@@ -1256,81 +1256,7 @@ namespace OpenSim.Region.Environment.Scenes
1256 } 1256 }
1257 } 1257 }
1258 } 1258 }
1259 1259
1260 public void ProcessConsoleCmd(string command, string[] cmdparams)
1261 {
1262 switch (command)
1263 {
1264 case "help":
1265 MainLog.Instance.Error("alert - send alert to a designated user or all users.");
1266 MainLog.Instance.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive.");
1267 MainLog.Instance.Error(" alert general [Message] - send an alert to all users.");
1268 MainLog.Instance.Error("backup - trigger a region backup");
1269 MainLog.Instance.Error("load-xml [filename] - load prims from a XML file into current region");
1270 MainLog.Instance.Error("save-xml [filename] - save prims from current region to a XML file");
1271 MainLog.Instance.Error("show users - show info about connected users in the current region.");
1272 MainLog.Instance.Error("shutdown - disconnect all clients and shutdown.");
1273 break;
1274
1275 case "show":
1276 if (cmdparams.Length > 0)
1277 {
1278 Show(cmdparams[0]);
1279 }
1280 break;
1281
1282 case "save-xml":
1283 if (cmdparams.Length > 0)
1284 {
1285 SavePrimsToXml(cmdparams[0]);
1286 }
1287 else
1288 {
1289 SavePrimsToXml("test.xml");
1290 }
1291 break;
1292
1293 case "load-xml":
1294 if (cmdparams.Length > 0)
1295 {
1296 LoadPrimsFromXml(cmdparams[0]);
1297 }
1298 else
1299 {
1300 LoadPrimsFromXml("test.xml");
1301 }
1302 break;
1303
1304 case "set-time":
1305 this.SetTimePhase(Convert.ToInt32(cmdparams[0]));
1306 break;
1307
1308 case "force-update":
1309 Console.WriteLine("Updating all clients");
1310 this.forceClientUpdate();
1311 break;
1312
1313 case "backup":
1314 Backup();
1315 break;
1316
1317 case "alert":
1318 HandleAlertCommand(cmdparams);
1319 break;
1320
1321 case "edit-scale":
1322 if (cmdparams.Length == 4)
1323 {
1324 HandleEditCommand(cmdparams);
1325 }
1326 break;
1327
1328 default:
1329 MainLog.Instance.Error("Unknown command: " + command);
1330 break;
1331 }
1332 }
1333
1334 public void HandleEditCommand(string[] cmmdparams) 1260 public void HandleEditCommand(string[] cmmdparams)
1335 { 1261 {
1336 Console.WriteLine("Searching for Primitive: '" + cmmdparams[0] + "'"); 1262 Console.WriteLine("Searching for Primitive: '" + cmmdparams[0] + "'");
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 9773407..dfac406 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -198,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes
198 { 198 {
199 foreach (Scene scene in m_localScenes) 199 foreach (Scene scene in m_localScenes)
200 { 200 {
201 if( scene.RegionInfo.RegionHandle == regionHandle ) 201 if (scene.RegionInfo.RegionHandle == regionHandle)
202 { 202 {
203 return scene.RegionInfo; 203 return scene.RegionInfo;
204 } 204 }
@@ -206,5 +206,32 @@ namespace OpenSim.Region.Environment.Scenes
206 206
207 return null; 207 return null;
208 } 208 }
209
210 public void SetTimePhase(int timePhase)
211 {
212 ForEach(delegate(Scene scene)
213 {
214 scene.SetTimePhase(
215 timePhase)
216 ;
217 });
218 }
219
220
221 public void ForceClientUpdate()
222 {
223 ForEach(delegate(Scene scene)
224 {
225 scene.ForceClientUpdate();
226 });
227 }
228
229 public void HandleEditCommand(string[] cmdparams)
230 {
231 ForEach(delegate(Scene scene)
232 {
233 scene.HandleEditCommand(cmdparams);
234 });
235 }
209 } 236 }
210} 237}