diff options
author | Justin Clark-Casey (justincc) | 2013-11-23 02:09:54 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-11-23 02:09:54 +0000 |
commit | b9e42aeb6e83b180cb1e36d30967233ff2141472 (patch) | |
tree | bf05cbc6a1622bf39a4c8375e3aabcb2172ebcd1 /OpenSim | |
parent | fix avatar rotation when sitting on a linked part (diff) | |
parent | Fixed the update StoreRegionWindlightSettings() wasn't updating regionwindlig... (diff) | |
download | opensim-SC_OLD-b9e42aeb6e83b180cb1e36d30967233ff2141472.zip opensim-SC_OLD-b9e42aeb6e83b180cb1e36d30967233ff2141472.tar.gz opensim-SC_OLD-b9e42aeb6e83b180cb1e36d30967233ff2141472.tar.bz2 opensim-SC_OLD-b9e42aeb6e83b180cb1e36d30967233ff2141472.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index 69b0beb..354d749 100644 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |||
@@ -824,7 +824,7 @@ namespace OpenSim.Data.PGSQL | |||
824 | 824 | ||
825 | public void StoreRegionWindlightSettings(RegionLightShareData wl) | 825 | public void StoreRegionWindlightSettings(RegionLightShareData wl) |
826 | { | 826 | { |
827 | string sql = @"select count (region_id) from regionwindlight where ""region_id"" = :region_id ;"; | 827 | string sql = @"select region_id from regionwindlight where ""region_id"" = :region_id limit 1;"; |
828 | bool exists = false; | 828 | bool exists = false; |
829 | using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) | 829 | using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) |
830 | { | 830 | { |
@@ -832,7 +832,8 @@ namespace OpenSim.Data.PGSQL | |||
832 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) | 832 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) |
833 | { | 833 | { |
834 | cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() )); | 834 | cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() )); |
835 | exists = cmd.ExecuteNonQuery() > 0; | 835 | NpgsqlDataReader dr = cmd.ExecuteReader(); |
836 | exists = dr.Read(); | ||
836 | } | 837 | } |
837 | } | 838 | } |
838 | if (exists) | 839 | if (exists) |
@@ -975,7 +976,7 @@ namespace OpenSim.Data.PGSQL | |||
975 | conn.Open(); | 976 | conn.Open(); |
976 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) | 977 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) |
977 | { | 978 | { |
978 | cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID)); | 979 | cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString())); |
979 | cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X)); | 980 | cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X)); |
980 | cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y)); | 981 | cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y)); |
981 | cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z)); | 982 | cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z)); |
@@ -993,7 +994,7 @@ namespace OpenSim.Data.PGSQL | |||
993 | cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y)); | 994 | cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y)); |
994 | cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X)); | 995 | cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X)); |
995 | cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y)); | 996 | cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y)); |
996 | cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture)); | 997 | cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture.ToString())); |
997 | cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X)); | 998 | cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X)); |
998 | cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y)); | 999 | cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y)); |
999 | cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z)); | 1000 | cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z)); |