aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionInfo.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-09-01 14:54:35 +0100
committerUbitUmarov2015-09-01 14:54:35 +0100
commit371c9dd2af01a2e7422ec901ee1f80757284a78c (patch)
tree058d2a513cacb12efcce0c0df0ae14ad135dbfe2 /OpenSim/Framework/RegionInfo.cs
parentremove lixo (diff)
parentdont change camera on crossings (diff)
downloadopensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.zip
opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.gz
opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.bz2
opensim-SC-371c9dd2af01a2e7422ec901ee1f80757284a78c.tar.xz
bad merge?
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-rw-r--r--OpenSim/Framework/RegionInfo.cs270
1 files changed, 270 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 79fbd96..d75a6cf 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -40,6 +40,7 @@ using OpenMetaverse.StructuredData;
40 40
41namespace OpenSim.Framework 41namespace OpenSim.Framework
42{ 42{
43 [Serializable]
43 public class RegionLightShareData : ICloneable 44 public class RegionLightShareData : ICloneable
44 { 45 {
45 public bool valid = false; 46 public bool valid = false;
@@ -101,6 +102,12 @@ namespace OpenSim.Framework
101 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 102 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
102 private static readonly string LogHeader = "[REGION INFO]"; 103 private static readonly string LogHeader = "[REGION INFO]";
103 104
105<<<<<<< HEAD
106=======
107 public bool commFailTF = false;
108 public ConfigurationMember configMember;
109 public string DataStore = String.Empty;
110>>>>>>> avn/ubitvar
104 public string RegionFile = String.Empty; 111 public string RegionFile = String.Empty;
105 public bool isSandbox = false; 112 public bool isSandbox = false;
106 public bool Persistent = true; 113 public bool Persistent = true;
@@ -527,7 +534,11 @@ namespace OpenSim.Framework
527 return null; 534 return null;
528 } 535 }
529 536
537<<<<<<< HEAD
530 private void SetExtraSetting(string key, string value) 538 private void SetExtraSetting(string key, string value)
539=======
540 public void SetExtraSetting(string key, string value)
541>>>>>>> avn/ubitvar
531 { 542 {
532 string keylower = key.ToLower(); 543 string keylower = key.ToLower();
533 m_extraSettings[keylower] = value; 544 m_extraSettings[keylower] = value;
@@ -823,7 +834,15 @@ namespace OpenSim.Framework
823 string location = String.Format("{0},{1}", RegionLocX, RegionLocY); 834 string location = String.Format("{0},{1}", RegionLocX, RegionLocY);
824 config.Set("Location", location); 835 config.Set("Location", location);
825 836
837<<<<<<< HEAD
826 if (RegionSizeX > 0) 838 if (RegionSizeX > 0)
839=======
840 if (DataStore != String.Empty)
841 config.Set("Datastore", DataStore);
842
843 if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize)
844 {
845>>>>>>> avn/ubitvar
827 config.Set("SizeX", RegionSizeX); 846 config.Set("SizeX", RegionSizeX);
828 847
829 if (RegionSizeY > 0) 848 if (RegionSizeY > 0)
@@ -901,6 +920,234 @@ namespace OpenSim.Framework
901 throw new Exception("Invalid file type for region persistence."); 920 throw new Exception("Invalid file type for region persistence.");
902 } 921 }
903 922
923<<<<<<< HEAD
924=======
925 public void loadConfigurationOptionsFromMe()
926 {
927 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID_NULL_FREE,
928 "UUID of Region (Default is recommended, random UUID)",
929 RegionID.ToString(), true);
930 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
931 "Region Name", RegionName, true);
932
933 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
934 "Grid Location (X Axis)", RegionLocX.ToString(), true);
935 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
936 "Grid Location (Y Axis)", RegionLocY.ToString(), true);
937 configMember.addConfigurationOption("sim_size_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
938 "Size of region in X dimension", RegionSizeX.ToString(), true);
939 configMember.addConfigurationOption("sim_size_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
940 "Size of region in Y dimension", RegionSizeY.ToString(), true);
941 configMember.addConfigurationOption("sim_size_z", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
942 "Size of region in Z dimension", RegionSizeZ.ToString(), true);
943
944 //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
945 configMember.addConfigurationOption("internal_ip_address",
946 ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
947 "Internal IP Address for incoming UDP client connections",
948 m_internalEndPoint.Address.ToString(),
949 true);
950 configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
951 "Internal IP Port for incoming UDP client connections",
952 m_internalEndPoint.Port.ToString(), true);
953 configMember.addConfigurationOption("allow_alternate_ports",
954 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
955 "Allow sim to find alternate UDP ports when ports are in use?",
956 m_allow_alternate_ports.ToString(), true);
957 configMember.addConfigurationOption("external_host_name",
958 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
959 "External Host Name", m_externalHostName, true);
960 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
961 "Last Map UUID", lastMapUUID.ToString(), true);
962 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
963 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
964
965 configMember.addConfigurationOption("nonphysical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
966 "Minimum size for nonphysical prims", m_nonphysPrimMin.ToString(), true);
967
968 configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
969 "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true);
970
971 configMember.addConfigurationOption("physical_prim_min", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
972 "Minimum size for nonphysical prims", m_physPrimMin.ToString(), true);
973
974 configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
975 "Maximum size for physical prims", m_physPrimMax.ToString(), true);
976
977 configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
978 "Clamp prims to max size", m_clampPrimSize.ToString(), true);
979
980 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
981 "Max objects this sim will hold", m_objectCapacity.ToString(), true);
982
983 configMember.addConfigurationOption("linkset_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
984 "Max prims an object will hold", m_linksetCapacity.ToString(), true);
985
986 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
987 "Max avatars this sim will hold", m_agentCapacity.ToString(), true);
988
989 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
990 "Scope ID for this region", ScopeID.ToString(), true);
991
992 configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
993 "Free form string describing the type of region", String.Empty, true);
994
995 configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
996 "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
997 }
998
999 public void loadConfigurationOptions()
1000 {
1001 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1002 "UUID of Region (Default is recommended, random UUID)",
1003 UUID.Random().ToString(), true);
1004 configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
1005 "Region Name", "OpenSim Test", false);
1006
1007 configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1008 "Grid Location (X Axis)", "1000", false);
1009 configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1010 "Grid Location (Y Axis)", "1000", false);
1011 configMember.addConfigurationOption("sim_size_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1012 "Size of region in X dimension", Constants.RegionSize.ToString(), false);
1013 configMember.addConfigurationOption("sim_size_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1014 "Size of region in Y dimension", Constants.RegionSize.ToString(), false);
1015 configMember.addConfigurationOption("sim_size_z", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
1016 "Size of region in Z dimension", Constants.RegionHeight.ToString(), false);
1017
1018 //m_configMember.addConfigurationOption("datastore", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Filename for local storage", "OpenSim.db", false);
1019 configMember.addConfigurationOption("internal_ip_address",
1020 ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS,
1021 "Internal IP Address for incoming UDP client connections", "0.0.0.0",
1022 false);
1023 configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1024 "Internal IP Port for incoming UDP client connections",
1025 ConfigSettings.DefaultRegionHttpPort.ToString(), false);
1026 configMember.addConfigurationOption("allow_alternate_ports", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
1027 "Allow sim to find alternate UDP ports when ports are in use?",
1028 "false", true);
1029 configMember.addConfigurationOption("external_host_name",
1030 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
1031 "External Host Name", "127.0.0.1", false);
1032 configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1033 "Last Map UUID", lastMapUUID.ToString(), true);
1034
1035 configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
1036 "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true);
1037
1038 configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1039 "Maximum size for nonphysical prims", "0", true);
1040
1041 configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1042 "Maximum size for physical prims", "0", true);
1043
1044 configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
1045 "Clamp prims to max size", "false", true);
1046
1047 configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1048 "Max objects this sim will hold", "15000", true);
1049
1050 configMember.addConfigurationOption("agent_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
1051 "Max avatars this sim will hold", "100", true);
1052
1053 configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1054 "Scope ID for this region", UUID.Zero.ToString(), true);
1055
1056 configMember.addConfigurationOption("region_type", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
1057 "Region Type", String.Empty, true);
1058
1059 configMember.addConfigurationOption("region_static_maptile", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
1060 "UUID of a texture to use as the map for this region", String.Empty, true);
1061 }
1062
1063 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
1064 {
1065 switch (configuration_key)
1066 {
1067 case "sim_UUID":
1068 RegionID = (UUID) configuration_result;
1069 originRegionID = (UUID) configuration_result;
1070 break;
1071 case "sim_name":
1072 RegionName = (string) configuration_result;
1073 break;
1074 case "sim_location_x":
1075 RegionLocX = (uint) configuration_result;
1076 break;
1077 case "sim_location_y":
1078 RegionLocY = (uint) configuration_result;
1079 break;
1080 case "sim_size_x":
1081 RegionSizeX = (uint) configuration_result;
1082 break;
1083 case "sim_size_y":
1084 RegionSizeY = (uint) configuration_result;
1085 break;
1086 case "sim_size_z":
1087 RegionSizeZ = (uint) configuration_result;
1088 break;
1089 case "datastore":
1090 DataStore = (string) configuration_result;
1091 break;
1092 case "internal_ip_address":
1093 IPAddress address = (IPAddress) configuration_result;
1094 m_internalEndPoint = new IPEndPoint(address, 0);
1095 break;
1096 case "internal_ip_port":
1097 m_internalEndPoint.Port = (int) configuration_result;
1098 break;
1099 case "allow_alternate_ports":
1100 m_allow_alternate_ports = (bool) configuration_result;
1101 break;
1102 case "external_host_name":
1103 if ((string) configuration_result != "SYSTEMIP")
1104 {
1105 m_externalHostName = (string) configuration_result;
1106 }
1107 else
1108 {
1109 m_externalHostName = Util.GetLocalHost().ToString();
1110 }
1111 break;
1112 case "lastmap_uuid":
1113 lastMapUUID = (UUID)configuration_result;
1114 break;
1115 case "lastmap_refresh":
1116 lastMapRefresh = (string)configuration_result;
1117 break;
1118 case "nonphysical_prim_max":
1119 m_nonphysPrimMax = (int)configuration_result;
1120 break;
1121 case "physical_prim_max":
1122 m_physPrimMax = (int)configuration_result;
1123 break;
1124 case "clamp_prim_size":
1125 m_clampPrimSize = (bool)configuration_result;
1126 break;
1127 case "object_capacity":
1128 m_objectCapacity = (int)configuration_result;
1129 break;
1130 case "linkset_capacity":
1131 m_linksetCapacity = (int)configuration_result;
1132 break;
1133 case "agent_capacity":
1134 m_agentCapacity = (int)configuration_result;
1135 break;
1136 case "scope_id":
1137 ScopeID = (UUID)configuration_result;
1138 break;
1139 case "region_type":
1140 m_regionType = (string)configuration_result;
1141 break;
1142 case "region_static_maptile":
1143 m_maptileStaticUUID = (UUID)configuration_result;
1144 break;
1145 }
1146
1147 return true;
1148 }
1149
1150>>>>>>> avn/ubitvar
904 public void SaveLastMapUUID(UUID mapUUID) 1151 public void SaveLastMapUUID(UUID mapUUID)
905 { 1152 {
906 lastMapUUID = mapUUID; 1153 lastMapUUID = mapUUID;
@@ -1004,5 +1251,28 @@ namespace OpenSim.Framework
1004 regionInfo.ServerURI = serverURI; 1251 regionInfo.ServerURI = serverURI;
1005 return regionInfo; 1252 return regionInfo;
1006 } 1253 }
1254
1255 public int getInternalEndPointPort()
1256 {
1257 return m_internalEndPoint.Port;
1258 }
1259
1260 public Dictionary<string, object> ToKeyValuePairs()
1261 {
1262 Dictionary<string, object> kvp = new Dictionary<string, object>();
1263 kvp["uuid"] = RegionID.ToString();
1264 kvp["locX"] = RegionLocX.ToString();
1265 kvp["locY"] = RegionLocY.ToString();
1266 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
1267 kvp["external_port"] = ExternalEndPoint.Port.ToString();
1268 kvp["external_host_name"] = ExternalHostName;
1269 kvp["http_port"] = HttpPort.ToString();
1270 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
1271 kvp["internal_port"] = InternalEndPoint.Port.ToString();
1272 kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
1273 kvp["server_uri"] = ServerURI;
1274
1275 return kvp;
1276 }
1007 } 1277 }
1008} 1278}