aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs61
1 files changed, 55 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 75b3fe6..f52a287 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -33,7 +33,6 @@ using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.CoreModules.World.Terrain;
37using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes; 37using OpenSim.Region.Framework.Scenes;
39 38
@@ -47,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
47 46
48 private Scene m_scene; 47 private Scene m_scene;
49 48
50 private EstateTerrainXferHandler TerrainUploader = null; 49 private EstateTerrainXferHandler TerrainUploader;
51 50
52 #region Packet Data Responders 51 #region Packet Data Responders
53 52
@@ -668,7 +667,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
668 LookupUUID(uuidNameLookupList); 667 LookupUUID(uuidNameLookupList);
669 } 668 }
670 669
671 private void LookupUUIDSCompleted(IAsyncResult iar) 670 private static void LookupUUIDSCompleted(IAsyncResult iar)
672 { 671 {
673 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; 672 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState;
674 icon.EndInvoke(iar); 673 icon.EndInvoke(iar);
@@ -683,7 +682,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
683 } 682 }
684 private void LookupUUIDsAsync(List<UUID> uuidLst) 683 private void LookupUUIDsAsync(List<UUID> uuidLst)
685 { 684 {
686 UUID[] uuidarr = new UUID[0]; 685 UUID[] uuidarr;
687 686
688 lock (uuidLst) 687 lock (uuidLst)
689 { 688 {
@@ -707,7 +706,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
707 706
708 for (int i = 0; i < avatars.Count; i++) 707 for (int i = 0; i < avatars.Count; i++)
709 { 708 {
710 HandleRegionInfoRequest(avatars[i].ControllingClient); ; 709 HandleRegionInfoRequest(avatars[i].ControllingClient);
711 } 710 }
712 } 711 }
713 712
@@ -768,7 +767,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
768 else 767 else
769 { 768 {
770 m_scene.RegionInfo.EstateSettings.UseGlobalTime = false; 769 m_scene.RegionInfo.EstateSettings.UseGlobalTime = false;
771 m_scene.RegionInfo.EstateSettings.SunPosition = (double)(parms2 - 0x1800)/1024.0; 770 m_scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
772 } 771 }
773 772
774 if ((parms1 & 0x00000010) != 0) 773 if ((parms1 & 0x00000010) != 0)
@@ -828,8 +827,58 @@ namespace OpenSim.Region.CoreModules.World.Estate
828 m_scene.RegisterModuleInterface<IEstateModule>(this); 827 m_scene.RegisterModuleInterface<IEstateModule>(this);
829 m_scene.EventManager.OnNewClient += EventManager_OnNewClient; 828 m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
830 m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; 829 m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
830
831 m_scene.AddCommand(this, "set terrain texture",
832 "set terrain texture <number> <uuid> [<x>] [<y>]",
833 "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " +
834 "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" +
835 " that coordinate.",
836 consoleSetTerrainTexture);
837
838 m_scene.AddCommand(this, "set terrain heights",
839 "set terrain heights <corner> <min> <max> [<x>] [<y>]",
840 "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " +
841 "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" +
842 " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.",
843 consoleSetTerrainTexture);
831 } 844 }
832 845
846 #region Console Commands
847
848 public void consoleSetTerrainTexture(string module, string[] args)
849 {
850 string num = args[3];
851 string uuid = args[4];
852 int x = (args.Length > 5 ? int.Parse(args[5]) : -1);
853 int y = (args.Length > 6 ? int.Parse(args[6]) : -1);
854
855 if (x != -1 && m_scene.RegionInfo.RegionLocX != x)
856 {
857 if (y != -1 && m_scene.RegionInfo.RegionLocY != y)
858 {
859 setEstateTerrainBaseTexture(null, int.Parse(num), UUID.Parse(uuid));
860 }
861 }
862 }
863
864 public void consoleSetTerrainHeights(string module, string[] args)
865 {
866 string num = args[3];
867 string min = args[4];
868 string max = args[5];
869 int x = (args.Length > 6 ? int.Parse(args[6]) : -1);
870 int y = (args.Length > 7 ? int.Parse(args[7]) : -1);
871
872 if (x != -1 && m_scene.RegionInfo.RegionLocX != x)
873 {
874 if (y != -1 && m_scene.RegionInfo.RegionLocY != y)
875 {
876 setEstateTerrainTextureHeights(null, int.Parse(num), float.Parse(min), float.Parse(max));
877 }
878 }
879 }
880
881 #endregion
833 882
834 public void PostInitialise() 883 public void PostInitialise()
835 { 884 {