aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorunknown2009-12-07 18:03:53 +0100
committerunknown2009-12-07 18:05:40 +0100
commit29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa (patch)
treefa63a89c92a1d0140c31c867aac27f74083d481c /OpenSim
parentEnforce physical prim max size on single prims. (diff)
downloadopensim-SC_OLD-29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa.zip
opensim-SC_OLD-29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa.tar.gz
opensim-SC_OLD-29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa.tar.bz2
opensim-SC_OLD-29a740ec8c78bfc3c1ab5b41b302ae2205c6e9aa.tar.xz
Initial windlight codebase commit
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs2
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs9
-rw-r--r--OpenSim/Data/MySQL/MySQLLegacyRegionData.cs192
-rw-r--r--OpenSim/Data/Null/NullDataStore.cs7
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs7
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/RegionInfo.cs69
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs7
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs2
16 files changed, 297 insertions, 17 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 0cae3dd..9f9d151 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -902,7 +902,7 @@ namespace OpenSim.Client.MXP.ClientStack
902 // Need to translate to MXP somehow 902 // Need to translate to MXP somehow
903 } 903 }
904 904
905 public void SendGenericMessage(string method, List<string> message) 905 public void SendGenericMessage(string method, List<byte[]> message)
906 { 906 {
907 // Need to translate to MXP somehow 907 // Need to translate to MXP somehow
908 } 908 }
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index fb87c15..533475f 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -483,7 +483,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
483 throw new System.NotImplementedException(); 483 throw new System.NotImplementedException();
484 } 484 }
485 485
486 public void SendGenericMessage(string method, List<string> message) 486 public void SendGenericMessage(string method, List<byte[]> message)
487 { 487 {
488 throw new System.NotImplementedException(); 488 throw new System.NotImplementedException();
489 } 489 }
diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
index 6371307..678b251 100644
--- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
@@ -671,7 +671,12 @@ VALUES
671 cmd.ExecuteNonQuery(); 671 cmd.ExecuteNonQuery();
672 } 672 }
673 } 673 }
674 674 public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
675 {
676 //This connector doesn't support the windlight module yet
677 //Return default LL windlight settings
678 return new RegionMeta7WindlightData();
679 }
675 /// <summary> 680 /// <summary>
676 /// Loads the settings of a region. 681 /// Loads the settings of a region.
677 /// </summary> 682 /// </summary>
@@ -696,7 +701,7 @@ VALUES
696 } 701 }
697 } 702 }
698 703
699 //If comes here then there is now region setting for that region 704 //If we reach this point then there are new region settings for that region
700 regionSettings = new RegionSettings(); 705 regionSettings = new RegionSettings();
701 regionSettings.RegionUUID = regionUUID; 706 regionSettings.RegionUUID = regionUUID;
702 regionSettings.OnSave += StoreRegionSettings; 707 regionSettings.OnSave += StoreRegionSettings;
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
index c49153f..e47d2a5 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -691,6 +691,97 @@ namespace OpenSim.Data.MySQL
691 } 691 }
692 } 692 }
693 693
694 public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
695 {
696 RegionMeta7WindlightData nWP = new RegionMeta7WindlightData();
697 nWP.OnSave += StoreRegionWindlightSettings;
698 lock (m_Connection)
699 {
700
701 string command = "select * from `regionwindlight` where region_id = ?regionID";
702
703 MySqlCommand cmd = new MySqlCommand(command);
704
705 cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
706
707 IDataReader result = ExecuteReader(cmd);
708 if (!result.Read())
709 {
710 //No result, so store our default windlight profile and return it
711 nWP.regionID = regionUUID;
712 StoreRegionWindlightSettings(nWP);
713 return nWP;
714 }
715 else
716 {
717 UUID.TryParse(result["region_id"].ToString(), out nWP.regionID);
718 nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
719 nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
720 nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
721 nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
722 nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
723 nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
724 nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
725 nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
726 nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
727 nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
728 nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
729 nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
730 nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
731 nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
732 nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
733 nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
734 nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
735 UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
736 nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
737 nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
738 nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
739 nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
740 nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
741 nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
742 nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
743 nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
744 nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
745 nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
746 nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
747 nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
748 nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
749 nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
750 nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
751 nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
752 nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
753 nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
754 nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
755 nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
756 nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
757 nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
758 nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
759 nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
760 nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
761 nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
762 nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
763 nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
764 nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
765 nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
766 nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
767 nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
768 nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
769 nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
770 nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
771 nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
772 nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
773 nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
774 nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
775 nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
776 nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
777 nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
778 nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
779 nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
780 }
781 }
782 return nWP;
783 }
784
694 public RegionSettings LoadRegionSettings(UUID regionUUID) 785 public RegionSettings LoadRegionSettings(UUID regionUUID)
695 { 786 {
696 RegionSettings rs = null; 787 RegionSettings rs = null;
@@ -724,6 +815,107 @@ namespace OpenSim.Data.MySQL
724 return rs; 815 return rs;
725 } 816 }
726 817
818 public void StoreRegionWindlightSettings(RegionMeta7WindlightData wl)
819 {
820 lock (m_Connection)
821 {
822 using (MySqlCommand cmd = m_Connection.CreateCommand())
823 {
824 cmd.CommandText = "REPLACE INTO `regionwindlight` (`region_id`, `water_color_r`, `water_color_g`, ";
825 cmd.CommandText += "`water_color_b`, `water_fog_density_exponent`, `underwater_fog_modifier`, ";
826 cmd.CommandText += "`reflection_wavelet_scale_1`, `reflection_wavelet_scale_2`, `reflection_wavelet_scale_3`, ";
827 cmd.CommandText += "`fresnel_scale`, `fresnel_offset`, `refract_scale_above`, `refract_scale_below`, ";
828 cmd.CommandText += "`blur_multiplier`, `big_wave_direction_x`, `big_wave_direction_y`, `little_wave_direction_x`, ";
829 cmd.CommandText += "`little_wave_direction_y`, `normal_map_texture`, `horizon_r`, `horizon_g`, `horizon_b`, ";
830 cmd.CommandText += "`horizon_i`, `haze_horizon`, `blue_density_r`, `blue_density_g`, `blue_density_b`, ";
831 cmd.CommandText += "`blue_density_i`, `haze_density`, `density_multiplier`, `distance_multiplier`, `max_altitude`, ";
832 cmd.CommandText += "`sun_moon_color_r`, `sun_moon_color_g`, `sun_moon_color_b`, `sun_moon_color_i`, `sun_moon_position`, ";
833 cmd.CommandText += "`ambient_r`, `ambient_g`, `ambient_b`, `ambient_i`, `east_angle`, `sun_glow_focus`, `sun_glow_size`, ";
834 cmd.CommandText += "`scene_gamma`, `star_brightness`, `cloud_color_r`, `cloud_color_g`, `cloud_color_b`, `cloud_color_i`, ";
835 cmd.CommandText += "`cloud_x`, `cloud_y`, `cloud_density`, `cloud_coverage`, `cloud_scale`, `cloud_detail_x`, ";
836 cmd.CommandText += "`cloud_detail_y`, `cloud_detail_density`, `cloud_scroll_x`, `cloud_scroll_x_lock`, `cloud_scroll_y`, ";
837 cmd.CommandText += "`cloud_scroll_y_lock`, `draw_classic_clouds`) VALUES (?region_id, ?water_color_r, ";
838 cmd.CommandText += "?water_color_g, ?water_color_b, ?water_fog_density_exponent, ?underwater_fog_modifier, ?reflection_wavelet_scale_1, ";
839 cmd.CommandText += "?reflection_wavelet_scale_2, ?reflection_wavelet_scale_3, ?fresnel_scale, ?fresnel_offset, ?refract_scale_above, ";
840 cmd.CommandText += "?refract_scale_below, ?blur_multiplier, ?big_wave_direction_x, ?big_wave_direction_y, ?little_wave_direction_x, ";
841 cmd.CommandText += "?little_wave_direction_y, ?normal_map_texture, ?horizon_r, ?horizon_g, ?horizon_b, ?horizon_i, ?haze_horizon, ";
842 cmd.CommandText += "?blue_density_r, ?blue_density_g, ?blue_density_b, ?blue_density_i, ?haze_density, ?density_multiplier, ";
843 cmd.CommandText += "?distance_multiplier, ?max_altitude, ?sun_moon_color_r, ?sun_moon_color_g, ?sun_moon_color_b, ";
844 cmd.CommandText += "?sun_moon_color_i, ?sun_moon_position, ?ambient_r, ?ambient_g, ?ambient_b, ?ambient_i, ?east_angle, ";
845 cmd.CommandText += "?sun_glow_focus, ?sun_glow_size, ?scene_gamma, ?star_brightness, ?cloud_color_r, ?cloud_color_g, ";
846 cmd.CommandText += "?cloud_color_b, ?cloud_color_i, ?cloud_x, ?cloud_y, ?cloud_density, ?cloud_coverage, ?cloud_scale, ";
847 cmd.CommandText += "?cloud_detail_x, ?cloud_detail_y, ?cloud_detail_density, ?cloud_scroll_x, ?cloud_scroll_x_lock, ";
848 cmd.CommandText += "?cloud_scroll_y, ?cloud_scroll_y_lock, ?draw_classic_clouds)";
849
850 cmd.Parameters.AddWithValue("region_id", wl.regionID);
851 cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
852 cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
853 cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
854 cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
855 cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
856 cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
857 cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
858 cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
859 cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
860 cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
861 cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
862 cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
863 cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
864 cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
865 cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
866 cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
867 cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
868 cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
869 cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
870 cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
871 cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
872 cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
873 cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
874 cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
875 cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
876 cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
877 cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
878 cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
879 cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
880 cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
881 cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
882 cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
883 cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
884 cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
885 cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
886 cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
887 cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
888 cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
889 cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
890 cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
891 cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
892 cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
893 cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
894 cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
895 cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
896 cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
897 cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
898 cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
899 cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
900 cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
901 cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
902 cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
903 cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
904 cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
905 cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
906 cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
907 cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
908 cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
909 cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
910 cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
911 cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
912 cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
913
914 ExecuteNonQuery(cmd);
915 }
916 }
917 }
918
727 public void StoreRegionSettings(RegionSettings rs) 919 public void StoreRegionSettings(RegionSettings rs)
728 { 920 {
729 lock (m_Connection) 921 lock (m_Connection)
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullDataStore.cs
index 427fa0a..39ca8f9 100644
--- a/OpenSim/Data/Null/NullDataStore.cs
+++ b/OpenSim/Data/Null/NullDataStore.cs
@@ -50,7 +50,12 @@ namespace OpenSim.Data.Null
50 public void StoreRegionSettings(RegionSettings rs) 50 public void StoreRegionSettings(RegionSettings rs)
51 { 51 {
52 } 52 }
53 53 public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
54 {
55 //This connector doesn't support the windlight module yet
56 //Return default LL windlight settings
57 return new RegionMeta7WindlightData();
58 }
54 public RegionSettings LoadRegionSettings(UUID regionUUID) 59 public RegionSettings LoadRegionSettings(UUID regionUUID)
55 { 60 {
56 return null; 61 return null;
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index b68de1a..53b806c 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -272,7 +272,12 @@ namespace OpenSim.Data.SQLite
272 Commit(); 272 Commit();
273 } 273 }
274 } 274 }
275 275 public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
276 {
277 //This connector doesn't support the windlight module yet
278 //Return default LL windlight settings
279 return new RegionMeta7WindlightData();
280 }
276 public RegionSettings LoadRegionSettings(UUID regionUUID) 281 public RegionSettings LoadRegionSettings(UUID regionUUID)
277 { 282 {
278 lock (ds) 283 lock (ds)
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 04ba9c6..cb136e2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1077,7 +1077,7 @@ namespace OpenSim.Framework
1077 1077
1078 void SendInstantMessage(GridInstantMessage im); 1078 void SendInstantMessage(GridInstantMessage im);
1079 1079
1080 void SendGenericMessage(string method, List<string> message); 1080 void SendGenericMessage(string method, List<byte[]> message);
1081 1081
1082 void SendLayerData(float[] map); 1082 void SendLayerData(float[] map);
1083 void SendLayerData(int px, int py, float[] map); 1083 void SendLayerData(int px, int py, float[] map);
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 721233d..c39cc03 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -36,8 +36,59 @@ using OpenMetaverse;
36using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38 38
39
39namespace OpenSim.Framework 40namespace OpenSim.Framework
40{ 41{
42 public class RegionMeta7WindlightData
43 {
44 public UUID regionID = UUID.Zero;
45 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
46 public float waterFogDensityExponent = 4.0f;
47 public float underwaterFogModifier = 0.25f;
48 public Vector3 reflectionWaveletScale = new Vector3(2.0f,2.0f,2.0f);
49 public float fresnelScale = 0.40f;
50 public float fresnelOffset = 0.50f;
51 public float refractScaleAbove = 0.03f;
52 public float refractScaleBelow = 0.20f;
53 public float blurMultiplier = 0.040f;
54 public Vector2 bigWaveDirection = new Vector2(1.05f,-0.42f);
55 public Vector2 littleWaveDirection = new Vector2(1.11f,-1.16f);
56 public UUID normalMapTexture = new UUID("822ded49-9a6c-f61c-cb89-6df54f42cdf4");
57 public Vector4 horizon = new Vector4(0.26f, 0.24f, 0.34f, 0.33f);
58 public float hazeHorizon = 0.19f;
59 public Vector4 blueDensity = new Vector4(0.10f, 0.93f, 0.02f, 0.93f);
60 public float hazeDensity = 0.70f;
61 public float densityMultiplier = 0.18f;
62 public float distanceMultiplier = 0.8f;
63 public UInt16 maxAltitude = 1605;
64 public Vector4 sunMoonColor = new Vector4(0.24f, 0.26f, 0.30f, 0.30f);
65 public float sunMoonPosition = 0.335f;
66 public Vector4 ambient = new Vector4(0.35f,0.35f,0.35f,0.35f);
67 public float eastAngle = 0.0f;
68 public float sunGlowFocus = 0.10f;
69 public float sunGlowSize = 0.10f;
70 public float sceneGamma = 1.0f;
71 public float starBrightness = 0.0f;
72 public Vector4 cloudColor = new Vector4(0.41f, 0.41f, 0.41f, 0.41f);
73 public Vector3 cloudXYDensity = new Vector3(1.00f, 0.53f, 1.00f);
74 public float cloudCoverage = 0.27f;
75 public float cloudScale = 0.42f;
76 public Vector3 cloudDetailXYDensity = new Vector3(1.00f, 0.53f, 0.12f);
77 public float cloudScrollX = 0.20f;
78 public bool cloudScrollXLock = false;
79 public float cloudScrollY = 0.01f;
80 public bool cloudScrollYLock = false;
81 public bool drawClassicClouds = false;
82
83 public delegate void SaveDelegate(RegionMeta7WindlightData wl);
84 public event SaveDelegate OnSave;
85 public void Save()
86 {
87 if (OnSave != null)
88 OnSave(this);
89 }
90 }
91
41 [Serializable] 92 [Serializable]
42 public class SimpleRegionInfo 93 public class SimpleRegionInfo
43 { 94 {
@@ -304,8 +355,7 @@ namespace OpenSim.Framework
304 private bool m_clampPrimSize = false; 355 private bool m_clampPrimSize = false;
305 private int m_objectCapacity = 0; 356 private int m_objectCapacity = 0;
306 private string m_regionType = String.Empty; 357 private string m_regionType = String.Empty;
307 358 private RegionMeta7WindlightData m_windlight = new RegionMeta7WindlightData();
308
309 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 359 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
310 360
311 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be 361 // MT: Yes. Estates can't span trust boundaries. Therefore, it can be
@@ -454,6 +504,21 @@ namespace OpenSim.Framework
454 set { m_regionSettings = value; } 504 set { m_regionSettings = value; }
455 } 505 }
456 506
507 public RegionMeta7WindlightData WindlightSettings
508 {
509 get
510 {
511 if (m_windlight == null)
512 {
513 m_windlight = new RegionMeta7WindlightData();
514 }
515
516 return m_windlight;
517 }
518
519 set { m_windlight = value; }
520 }
521
457 public int NonphysPrimMax 522 public int NonphysPrimMax
458 { 523 {
459 get { return m_nonphysPrimMax; } 524 get { return m_nonphysPrimMax; }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index b588a2e..6cbf1a6 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -764,16 +764,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
764 } 764 }
765 } 765 }
766 766
767 public void SendGenericMessage(string method, List<string> message) 767 public void SendGenericMessage(string method, List<byte[]> message)
768 { 768 {
769 GenericMessagePacket gmp = new GenericMessagePacket(); 769 GenericMessagePacket gmp = new GenericMessagePacket();
770 gmp.MethodData.Method = Util.StringToBytes256(method); 770 gmp.MethodData.Method = Util.StringToBytes256(method);
771 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; 771 gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count];
772 int i = 0; 772 int i = 0;
773 foreach (string val in message) 773 foreach (byte[] val in message)
774 { 774 {
775 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); 775 gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock();
776 gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); 776 gmp.ParamList[i++].Parameter = val;
777 } 777 }
778 OutPacket(gmp, ThrottleOutPacketType.Task); 778 OutPacket(gmp, ThrottleOutPacketType.Task);
779 } 779 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 9754da3..816060f 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -433,7 +433,7 @@ namespace OpenSim.Region.Examples.SimpleModule
433 433
434 } 434 }
435 435
436 public void SendGenericMessage(string method, List<string> message) 436 public void SendGenericMessage(string method, List<byte[]> message)
437 { 437 {
438 438
439 } 439 }
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
index 78bd622..225cc9a 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs
@@ -103,6 +103,7 @@ namespace OpenSim.Region.Framework.Interfaces
103 103
104 void StoreRegionSettings(RegionSettings rs); 104 void StoreRegionSettings(RegionSettings rs);
105 RegionSettings LoadRegionSettings(UUID regionUUID); 105 RegionSettings LoadRegionSettings(UUID regionUUID);
106 RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID);
106 107
107 void Shutdown(); 108 void Shutdown();
108 } 109 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f5a1e74..f70af27 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -539,6 +539,8 @@ namespace OpenSim.Region.Framework.Scenes
539 539
540 // Load region settings 540 // Load region settings
541 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 541 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
542 m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
543
542 if (m_storageManager.EstateDataStore != null) 544 if (m_storageManager.EstateDataStore != null)
543 { 545 {
544 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); 546 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 8a27b7b..e8cda60 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -101,7 +101,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
101 { 101 {
102 throw new NotImplementedException(); 102 throw new NotImplementedException();
103 } 103 }
104 104 public RegionMeta7WindlightData LoadRegionWindlightSettings(UUID regionUUID)
105 {
106 //This connector doesn't support the windlight module yet
107 //Return default LL windlight settings
108 return new RegionMeta7WindlightData();
109 }
105 public RegionSettings LoadRegionSettings(UUID regionUUID) 110 public RegionSettings LoadRegionSettings(UUID regionUUID)
106 { 111 {
107 return null; 112 return null;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 6c3e7eb..bdf1574 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -936,7 +936,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
936 // TODO 936 // TODO
937 } 937 }
938 938
939 public void SendGenericMessage(string method, List<string> message) 939 public void SendGenericMessage(string method, List<byte[]> message)
940 { 940 {
941 941
942 } 942 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index cf36d08..975033a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
522 522
523 } 523 }
524 524
525 public void SendGenericMessage(string method, List<string> message) 525 public void SendGenericMessage(string method, List<byte[]> message)
526 { 526 {
527 527
528 } 528 }
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 27025d9..5f172c4 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -491,7 +491,7 @@ namespace OpenSim.Tests.Common.Mock
491 491
492 } 492 }
493 493
494 public void SendGenericMessage(string method, List<string> message) 494 public void SendGenericMessage(string method, List<byte[]> message)
495 { 495 {
496 496
497 } 497 }