diff options
* moved SceneManager to RegionApplicationBase
* Implemented SceneManager.StopScene() and Scene.Stop()
* Some SimpleApping
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index a32b625..66ae987 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -67,7 +67,6 @@ namespace OpenSim | |||
67 | 67 | ||
68 | protected List<UDPServer> m_udpServers = new List<UDPServer>(); | 68 | protected List<UDPServer> m_udpServers = new List<UDPServer>(); |
69 | protected List<RegionInfo> m_regionData = new List<RegionInfo>(); | 69 | protected List<RegionInfo> m_regionData = new List<RegionInfo>(); |
70 | protected SceneManager m_localScenes = new SceneManager(); | ||
71 | 70 | ||
72 | private bool m_silent; | 71 | private bool m_silent; |
73 | private readonly string m_logFilename = ("region-console.log"); | 72 | private readonly string m_logFilename = ("region-console.log"); |
@@ -215,7 +214,7 @@ namespace OpenSim | |||
215 | //Server side object editing permissions checking | 214 | //Server side object editing permissions checking |
216 | scene.PermissionsMngr.BypassPermissions = !m_permissions; | 215 | scene.PermissionsMngr.BypassPermissions = !m_permissions; |
217 | 216 | ||
218 | m_localScenes.Add(scene); | 217 | m_sceneManager.Add(scene); |
219 | 218 | ||
220 | m_udpServers.Add(udpServer); | 219 | m_udpServers.Add(udpServer); |
221 | m_regionData.Add(regionInfo); | 220 | m_regionData.Add(regionInfo); |
@@ -332,7 +331,7 @@ namespace OpenSim | |||
332 | // IMPLEMENT THIS | 331 | // IMPLEMENT THIS |
333 | m_log.Verbose("Closing console and terminating"); | 332 | m_log.Verbose("Closing console and terminating"); |
334 | 333 | ||
335 | m_localScenes.Close(); | 334 | m_sceneManager.Close(); |
336 | 335 | ||
337 | m_log.Close(); | 336 | m_log.Close(); |
338 | Environment.Exit(0); | 337 | Environment.Exit(0); |
@@ -377,19 +376,19 @@ namespace OpenSim | |||
377 | switch (command) | 376 | switch (command) |
378 | { | 377 | { |
379 | case "set-time": | 378 | case "set-time": |
380 | m_localScenes.SetCurrentSceneTimePhase(Convert.ToInt32(cmdparams[0])); | 379 | m_sceneManager.SetCurrentSceneTimePhase(Convert.ToInt32(cmdparams[0])); |
381 | break; | 380 | break; |
382 | 381 | ||
383 | case "force-update": | 382 | case "force-update": |
384 | Console.WriteLine("Updating all clients"); | 383 | Console.WriteLine("Updating all clients"); |
385 | m_localScenes.ForceCurrentSceneClientUpdate(); | 384 | m_sceneManager.ForceCurrentSceneClientUpdate(); |
386 | break; | 385 | break; |
387 | 386 | ||
388 | 387 | ||
389 | case "edit-scale": | 388 | case "edit-scale": |
390 | if (cmdparams.Length == 4) | 389 | if (cmdparams.Length == 4) |
391 | { | 390 | { |
392 | m_localScenes.HandleEditCommandOnCurrentScene(cmdparams); | 391 | m_sceneManager.HandleEditCommandOnCurrentScene(cmdparams); |
393 | } | 392 | } |
394 | break; | 393 | break; |
395 | 394 | ||
@@ -427,34 +426,34 @@ namespace OpenSim | |||
427 | case "save-xml": | 426 | case "save-xml": |
428 | if (cmdparams.Length > 0) | 427 | if (cmdparams.Length > 0) |
429 | { | 428 | { |
430 | m_localScenes.SaveCurrentSceneToXml(cmdparams[0]); | 429 | m_sceneManager.SaveCurrentSceneToXml(cmdparams[0]); |
431 | } | 430 | } |
432 | else | 431 | else |
433 | { | 432 | { |
434 | m_localScenes.SaveCurrentSceneToXml(DEFAULT_PRIM_BACKUP_FILENAME); | 433 | m_sceneManager.SaveCurrentSceneToXml(DEFAULT_PRIM_BACKUP_FILENAME); |
435 | } | 434 | } |
436 | break; | 435 | break; |
437 | 436 | ||
438 | case "load-xml": | 437 | case "load-xml": |
439 | if (cmdparams.Length > 0) | 438 | if (cmdparams.Length > 0) |
440 | { | 439 | { |
441 | m_localScenes.LoadCurrentSceneFromXml(cmdparams[0]); | 440 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0]); |
442 | } | 441 | } |
443 | else | 442 | else |
444 | { | 443 | { |
445 | m_localScenes.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME); | 444 | m_sceneManager.LoadCurrentSceneFromXml(DEFAULT_PRIM_BACKUP_FILENAME); |
446 | } | 445 | } |
447 | break; | 446 | break; |
448 | 447 | ||
449 | case "terrain": | 448 | case "terrain": |
450 | if (!m_localScenes.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) | 449 | if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) |
451 | { | 450 | { |
452 | m_log.Error(result); | 451 | m_log.Error(result); |
453 | } | 452 | } |
454 | break; | 453 | break; |
455 | 454 | ||
456 | case "script": | 455 | case "script": |
457 | m_localScenes.SendCommandToCurrentSceneScripts(cmdparams); | 456 | m_sceneManager.SendCommandToCurrentSceneScripts(cmdparams); |
458 | break; | 457 | break; |
459 | 458 | ||
460 | case "command-script": | 459 | case "command-script": |
@@ -468,16 +467,16 @@ namespace OpenSim | |||
468 | // Treats each user as a super-admin when disabled | 467 | // Treats each user as a super-admin when disabled |
469 | bool permissions = Convert.ToBoolean(cmdparams[0]); | 468 | bool permissions = Convert.ToBoolean(cmdparams[0]); |
470 | 469 | ||
471 | m_localScenes.SetBypassPermissionsOnCurrentScene(!permissions); | 470 | m_sceneManager.SetBypassPermissionsOnCurrentScene(!permissions); |
472 | 471 | ||
473 | break; | 472 | break; |
474 | 473 | ||
475 | case "backup": | 474 | case "backup": |
476 | m_localScenes.BackupCurrentScene(); | 475 | m_sceneManager.BackupCurrentScene(); |
477 | break; | 476 | break; |
478 | 477 | ||
479 | case "alert": | 478 | case "alert": |
480 | m_localScenes.HandleAlertCommandOnCurrentScene(cmdparams); | 479 | m_sceneManager.HandleAlertCommandOnCurrentScene(cmdparams); |
481 | break; | 480 | break; |
482 | 481 | ||
483 | case "create": | 482 | case "create": |
@@ -497,7 +496,7 @@ namespace OpenSim | |||
497 | { | 496 | { |
498 | string regionName = this.CombineParams(cmdparams, 0); | 497 | string regionName = this.CombineParams(cmdparams, 0); |
499 | 498 | ||
500 | if (m_localScenes.TrySetCurrentScene(regionName)) | 499 | if (m_sceneManager.TrySetCurrentScene(regionName)) |
501 | { | 500 | { |
502 | 501 | ||
503 | } | 502 | } |
@@ -507,13 +506,13 @@ namespace OpenSim | |||
507 | } | 506 | } |
508 | } | 507 | } |
509 | 508 | ||
510 | if (m_localScenes.CurrentScene == null) | 509 | if (m_sceneManager.CurrentScene == null) |
511 | { | 510 | { |
512 | MainLog.Instance.Verbose("Currently at Root level. To change region please use 'change-region <regioname>'"); | 511 | MainLog.Instance.Verbose("Currently at Root level. To change region please use 'change-region <regioname>'"); |
513 | } | 512 | } |
514 | else | 513 | else |
515 | { | 514 | { |
516 | MainLog.Instance.Verbose("Current Region: " + m_localScenes.CurrentScene.RegionInfo.RegionName + ". To change region please use 'change-region <regioname>'"); | 515 | MainLog.Instance.Verbose("Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + ". To change region please use 'change-region <regioname>'"); |
517 | } | 516 | } |
518 | 517 | ||
519 | break; | 518 | break; |
@@ -535,7 +534,7 @@ namespace OpenSim | |||
535 | int newDebug; | 534 | int newDebug; |
536 | if (int.TryParse(args[1], out newDebug)) | 535 | if (int.TryParse(args[1], out newDebug)) |
537 | { | 536 | { |
538 | m_localScenes.SetDebugPacketOnCurrentScene(m_log, newDebug); | 537 | m_sceneManager.SetDebugPacketOnCurrentScene(m_log, newDebug); |
539 | } | 538 | } |
540 | else | 539 | else |
541 | { | 540 | { |
@@ -568,11 +567,11 @@ namespace OpenSim | |||
568 | case "users": | 567 | case "users": |
569 | m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP", "World")); | 568 | m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP", "World")); |
570 | 569 | ||
571 | List<ScenePresence> avatars = m_localScenes.GetCurrentSceneAvatars(); | 570 | List<ScenePresence> avatars = m_sceneManager.GetCurrentSceneAvatars(); |
572 | 571 | ||
573 | foreach (ScenePresence avatar in avatars) | 572 | foreach (ScenePresence avatar in avatars) |
574 | { | 573 | { |
575 | RegionInfo regionInfo = m_localScenes.GetRegionInfo(avatar.RegionHandle); | 574 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(avatar.RegionHandle); |
576 | string regionName; | 575 | string regionName; |
577 | 576 | ||
578 | if (regionInfo == null) | 577 | if (regionInfo == null) |