aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2013-01-31 20:16:45 +0000
committerMelanie2013-01-31 20:16:45 +0000
commite497cf6f046f962815a216335cc9a6f7f2d9924f (patch)
tree594872079760aab626dab1ad71eeca52cee7b10d /OpenSim/Region/Framework
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC_OLD-e497cf6f046f962815a216335cc9a6f7f2d9924f.zip
opensim-SC_OLD-e497cf6f046f962815a216335cc9a6f7f2d9924f.tar.gz
opensim-SC_OLD-e497cf6f046f962815a216335cc9a6f7f2d9924f.tar.bz2
opensim-SC_OLD-e497cf6f046f962815a216335cc9a6f7f2d9924f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs214
1 files changed, 106 insertions, 108 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0bed66e..40a57a4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -847,141 +847,139 @@ namespace OpenSim.Region.Framework.Scenes
847 847
848 // Region config overrides global config 848 // Region config overrides global config
849 // 849 //
850 try 850 if (m_config.Configs["Startup"] != null)
851 { 851 {
852 if (m_config.Configs["Startup"] != null) 852 IConfig startupConfig = m_config.Configs["Startup"];
853 {
854 IConfig startupConfig = m_config.Configs["Startup"];
855 853
856 StartDisabled = startupConfig.GetBoolean("StartDisabled", false); 854 StartDisabled = startupConfig.GetBoolean("StartDisabled", false);
857 855
858 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance); 856 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
859 UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); 857 UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup);
860 if (!UseBackup) 858 if (!UseBackup)
861 m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); 859 m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
862 860
863 //Animation states 861 //Animation states
864 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 862 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
865 863
866 PhysicalPrims = startupConfig.GetBoolean("physical_prim", true); 864 PhysicalPrims = startupConfig.GetBoolean("physical_prim", true);
867 CollidablePrims = startupConfig.GetBoolean("collidable_prim", true); 865 CollidablePrims = startupConfig.GetBoolean("collidable_prim", true);
868 866
869 m_minNonphys = startupConfig.GetFloat("NonPhysicalPrimMin", m_minNonphys); 867 m_minNonphys = startupConfig.GetFloat("NonPhysicalPrimMin", m_minNonphys);
870 if (RegionInfo.NonphysPrimMin > 0) 868 if (RegionInfo.NonphysPrimMin > 0)
871 { 869 {
872 m_minNonphys = RegionInfo.NonphysPrimMin; 870 m_minNonphys = RegionInfo.NonphysPrimMin;
873 } 871 }
874 872
875 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 873 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
876 if (RegionInfo.NonphysPrimMax > 0) 874 if (RegionInfo.NonphysPrimMax > 0)
877 { 875 {
878 m_maxNonphys = RegionInfo.NonphysPrimMax; 876 m_maxNonphys = RegionInfo.NonphysPrimMax;
879 } 877 }
880 878
881 m_minPhys = startupConfig.GetFloat("PhysicalPrimMin", m_minPhys); 879 m_minPhys = startupConfig.GetFloat("PhysicalPrimMin", m_minPhys);
882 if (RegionInfo.PhysPrimMin > 0) 880 if (RegionInfo.PhysPrimMin > 0)
883 { 881 {
884 m_minPhys = RegionInfo.PhysPrimMin; 882 m_minPhys = RegionInfo.PhysPrimMin;
885 } 883 }
886 884
887 m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", m_maxPhys); 885 m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", m_maxPhys);
888 886
889 if (RegionInfo.PhysPrimMax > 0) 887 if (RegionInfo.PhysPrimMax > 0)
890 { 888 {
891 m_maxPhys = RegionInfo.PhysPrimMax; 889 m_maxPhys = RegionInfo.PhysPrimMax;
892 } 890 }
893 891
894 m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity); 892 m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity);
895 if (RegionInfo.LinksetCapacity > 0) 893 if (RegionInfo.LinksetCapacity > 0)
896 { 894 {
897 m_linksetCapacity = RegionInfo.LinksetCapacity; 895 m_linksetCapacity = RegionInfo.LinksetCapacity;
898 } 896 }
899 897
900 SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest"); 898 SpawnPointRouting = startupConfig.GetString("SpawnPointRouting", "closest");
901 TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false); 899 TelehubAllowLandmarks = startupConfig.GetBoolean("TelehubAllowLandmark", false);
902 900
903 // Here, if clamping is requested in either global or 901 // Here, if clamping is requested in either global or
904 // local config, it will be used 902 // local config, it will be used
905 // 903 //
906 m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", m_clampPrimSize); 904 m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", m_clampPrimSize);
907 if (RegionInfo.ClampPrimSize) 905 if (RegionInfo.ClampPrimSize)
906 {
907 m_clampPrimSize = true;
908 }
909
910 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
911 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
912 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
913 m_dontPersistBefore =
914 startupConfig.GetLong("MinimumTimeBeforePersistenceConsidered", DEFAULT_MIN_TIME_FOR_PERSISTENCE);
915 m_dontPersistBefore *= 10000000;
916 m_persistAfter =
917 startupConfig.GetLong("MaximumTimeBeforePersistenceConsidered", DEFAULT_MAX_TIME_FOR_PERSISTENCE);
918 m_persistAfter *= 10000000;
919
920 m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine");
921 m_log.InfoFormat("[SCENE]: Default script engine {0}", m_defaultScriptEngine);
922
923 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
924 m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion);
925 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
926
927 m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true);
928 if (m_generateMaptiles)
929 {
930 int maptileRefresh = startupConfig.GetInt("MaptileRefresh", 0);
931 if (maptileRefresh != 0)
908 { 932 {
909 m_clampPrimSize = true; 933 m_mapGenerationTimer.Interval = maptileRefresh * 1000;
934 m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister;
935 m_mapGenerationTimer.AutoReset = true;
936 m_mapGenerationTimer.Start();
910 } 937 }
938 }
939 else
940 {
941 string tile = startupConfig.GetString("MaptileStaticUUID", UUID.Zero.ToString());
942 UUID tileID;
911 943
912 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete); 944 if ((tile!=UUID.Zero.ToString()) && UUID.TryParse(tile, out tileID))
913 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
914 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
915 m_dontPersistBefore =
916 startupConfig.GetLong("MinimumTimeBeforePersistenceConsidered", DEFAULT_MIN_TIME_FOR_PERSISTENCE);
917 m_dontPersistBefore *= 10000000;
918 m_persistAfter =
919 startupConfig.GetLong("MaximumTimeBeforePersistenceConsidered", DEFAULT_MAX_TIME_FOR_PERSISTENCE);
920 m_persistAfter *= 10000000;
921
922 m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "XEngine");
923 m_log.InfoFormat("[SCENE]: Default script engine {0}", m_defaultScriptEngine);
924
925 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
926 m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion);
927 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
928
929 m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true);
930 if (m_generateMaptiles)
931 { 945 {
932 int maptileRefresh = startupConfig.GetInt("MaptileRefresh", 0); 946 RegionInfo.RegionSettings.TerrainImageID = tileID;
933 if (maptileRefresh != 0)
934 {
935 m_mapGenerationTimer.Interval = maptileRefresh * 1000;
936 m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister;
937 m_mapGenerationTimer.AutoReset = true;
938 m_mapGenerationTimer.Start();
939 }
940 } 947 }
941 else 948 else
942 { 949 {
943 string tile = startupConfig.GetString("MaptileStaticUUID", UUID.Zero.ToString()); 950 RegionInfo.RegionSettings.TerrainImageID = RegionInfo.MaptileStaticUUID;
944 UUID tileID; 951 m_log.InfoFormat("[SCENE]: Region {0}, maptile set to {1}", RegionInfo.RegionName, RegionInfo.MaptileStaticUUID.ToString());
945
946 if (UUID.TryParse(tile, out tileID))
947 {
948 RegionInfo.RegionSettings.TerrainImageID = tileID;
949 }
950 } 952 }
953 }
951 954
952 string grant = startupConfig.GetString("AllowedClients", String.Empty); 955 string grant = startupConfig.GetString("AllowedClients", String.Empty);
953 if (grant.Length > 0) 956 if (grant.Length > 0)
957 {
958 foreach (string viewer in grant.Split(','))
954 { 959 {
955 foreach (string viewer in grant.Split(',')) 960 m_AllowedViewers.Add(viewer.Trim().ToLower());
956 {
957 m_AllowedViewers.Add(viewer.Trim().ToLower());
958 }
959 } 961 }
962 }
960 963
961 grant = startupConfig.GetString("BannedClients", String.Empty); 964 grant = startupConfig.GetString("BannedClients", String.Empty);
962 if (grant.Length > 0) 965 if (grant.Length > 0)
966 {
967 foreach (string viewer in grant.Split(','))
963 { 968 {
964 foreach (string viewer in grant.Split(',')) 969 m_BannedViewers.Add(viewer.Trim().ToLower());
965 {
966 m_BannedViewers.Add(viewer.Trim().ToLower());
967 }
968 } 970 }
969
970 MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime);
971 m_update_backup = startupConfig.GetInt( "UpdateStorageEveryNFrames", m_update_backup);
972 m_update_coarse_locations = startupConfig.GetInt( "UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations);
973 m_update_entitymovement = startupConfig.GetInt( "UpdateEntityMovementEveryNFrames", m_update_entitymovement);
974 m_update_events = startupConfig.GetInt( "UpdateEventsEveryNFrames", m_update_events);
975 m_update_objects = startupConfig.GetInt( "UpdateObjectsEveryNFrames", m_update_objects);
976 m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics);
977 m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences);
978 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain);
979 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning);
980 } 971 }
981 } 972
982 catch (Exception e) 973 MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime);
983 { 974 m_update_backup = startupConfig.GetInt( "UpdateStorageEveryNFrames", m_update_backup);
984 m_log.Error("[SCENE]: Failed to load StartupConfig: " + e.ToString()); 975 m_update_coarse_locations = startupConfig.GetInt( "UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations);
976 m_update_entitymovement = startupConfig.GetInt( "UpdateEntityMovementEveryNFrames", m_update_entitymovement);
977 m_update_events = startupConfig.GetInt( "UpdateEventsEveryNFrames", m_update_events);
978 m_update_objects = startupConfig.GetInt( "UpdateObjectsEveryNFrames", m_update_objects);
979 m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics);
980 m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences);
981 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain);
982 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning);
985 } 983 }
986 984
987 // FIXME: Ultimately this should be in a module. 985 // FIXME: Ultimately this should be in a module.