aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-09-03 18:39:08 +0100
committerUbitUmarov2015-09-03 18:39:08 +0100
commitcdaed113872f0615a0d2864cc54064a4432054c6 (patch)
tree246e62dfeffac632cdcd9738a77faebd30b3bd6c /OpenSim/Data/MySQL/MySQLSimulationData.cs
parentseems to compile ( tests comented out) (diff)
downloadopensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.zip
opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.gz
opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.bz2
opensim-SC-cdaed113872f0615a0d2864cc54064a4432054c6.tar.xz
at last we can login and see objects ( friends is dead and disable in
scenepresence)
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs101
1 files changed, 37 insertions, 64 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 549d129..a62d347 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -1089,42 +1089,43 @@ namespace OpenSim.Data.MySQL
1089 using (MySqlCommand cmd = dbcon.CreateCommand()) 1089 using (MySqlCommand cmd = dbcon.CreateCommand())
1090 { 1090 {
1091 cmd.CommandText = "replace into regionsettings (regionUUID, " + 1091 cmd.CommandText = "replace into regionsettings (regionUUID, " +
1092 "block_terraform, block_fly, allow_damage, " + 1092 "block_terraform, block_fly, allow_damage, " +
1093 "restrict_pushing, allow_land_resell, " + 1093 "restrict_pushing, allow_land_resell, " +
1094 "allow_land_join_divide, block_show_in_search, " + 1094 "allow_land_join_divide, block_show_in_search, " +
1095 "agent_limit, object_bonus, maturity, " + 1095 "agent_limit, object_bonus, maturity, " +
1096 "disable_scripts, disable_collisions, " + 1096 "disable_scripts, disable_collisions, " +
1097 "disable_physics, terrain_texture_1, " + 1097 "disable_physics, terrain_texture_1, " +
1098 "terrain_texture_2, terrain_texture_3, " + 1098 "terrain_texture_2, terrain_texture_3, " +
1099 "terrain_texture_4, elevation_1_nw, " + 1099 "terrain_texture_4, elevation_1_nw, " +
1100 "elevation_2_nw, elevation_1_ne, " + 1100 "elevation_2_nw, elevation_1_ne, " +
1101 "elevation_2_ne, elevation_1_se, " + 1101 "elevation_2_ne, elevation_1_se, " +
1102 "elevation_2_se, elevation_1_sw, " + 1102 "elevation_2_se, elevation_1_sw, " +
1103 "elevation_2_sw, water_height, " + 1103 "elevation_2_sw, water_height, " +
1104 "terrain_raise_limit, terrain_lower_limit, " + 1104 "terrain_raise_limit, terrain_lower_limit, " +
1105 "use_estate_sun, fixed_sun, sun_position, " + 1105 "use_estate_sun, fixed_sun, sun_position, " +
1106 "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " + 1106 "covenant, covenant_datetime, Sandbox, sunvectorx, sunvectory, " +
1107 "sunvectorz, loaded_creation_datetime, " + 1107 "sunvectorz, loaded_creation_datetime, " +
1108 "loaded_creation_id, map_tile_ID, block_search, casino, " + 1108 "loaded_creation_id, map_tile_ID, block_search, casino, " +
1109 "TelehubObject, parcel_tile_ID) " + 1109 "TelehubObject, parcel_tile_ID) " +
1110 "values (?RegionUUID, ?BlockTerraform, " + 1110 "values (?RegionUUID, ?BlockTerraform, " +
1111 "?BlockFly, ?AllowDamage, ?RestrictPushing, " + 1111 "?BlockFly, ?AllowDamage, ?RestrictPushing, " +
1112 "?AllowLandResell, ?AllowLandJoinDivide, " + 1112 "?AllowLandResell, ?AllowLandJoinDivide, " +
1113 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + 1113 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
1114 "?Maturity, ?DisableScripts, ?DisableCollisions, " + 1114 "?Maturity, ?DisableScripts, ?DisableCollisions, " +
1115 "?DisablePhysics, ?TerrainTexture1, " + 1115 "?DisablePhysics, ?TerrainTexture1, " +
1116 "?TerrainTexture2, ?TerrainTexture3, " + 1116 "?TerrainTexture2, ?TerrainTexture3, " +
1117 "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " + 1117 "?TerrainTexture4, ?Elevation1NW, ?Elevation2NW, " +
1118 "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " + 1118 "?Elevation1NE, ?Elevation2NE, ?Elevation1SE, " +
1119 "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " + 1119 "?Elevation2SE, ?Elevation1SW, ?Elevation2SW, " +
1120 "?WaterHeight, ?TerrainRaiseLimit, " + 1120 "?WaterHeight, ?TerrainRaiseLimit, " +
1121 "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + 1121 "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " +
1122 "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " + 1122 "?SunPosition, ?Covenant, ?CovenantChangedDateTime, ?Sandbox, " +
1123 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + 1123 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
1124 "?LoadedCreationDateTime, ?LoadedCreationID, " + 1124 "?LoadedCreationDateTime, ?LoadedCreationID, " +
1125 "?TerrainImageID, ?block_search, ?casino, " + 1125 "?TerrainImageID, ?block_search, ?casino, " +
1126 "?TelehubObject, ?ParcelImageID)"; 1126 "?TelehubObject, ?ParcelImageID)";
1127 1127
1128 FillRegionSettingsCommand(cmd, rs);
1128 ExecuteNonQuery(cmd); 1129 ExecuteNonQuery(cmd);
1129 } 1130 }
1130 1131
@@ -1567,34 +1568,6 @@ namespace OpenSim.Data.MySQL
1567 } 1568 }
1568 1569
1569 /// <summary> 1570 /// <summary>
1570 ///
1571 /// </summary>
1572 /// <param name="val"></param>
1573 /// <returns></returns>
1574 private static Array SerializeTerrain(double[,] val, double[,] oldTerrain)
1575 {
1576 MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
1577 BinaryWriter bw = new BinaryWriter(str);
1578
1579 // TODO: COMPATIBILITY - Add byte-order conversions
1580 for (int x = 0; x < (int)Constants.RegionSize; x++)
1581 for (int y = 0; y < (int)Constants.RegionSize; y++)
1582 {
1583 double height = 20.0;
1584 if (oldTerrain != null)
1585 height = oldTerrain[x, y];
1586 if (!double.IsNaN(val[x, y]))
1587 height = val[x, y];
1588 if (height == 0.0)
1589 height = double.Epsilon;
1590
1591 bw.Write(height);
1592 }
1593
1594 return str.ToArray();
1595 }
1596
1597 /// <summary>
1598 /// Fill the prim command with prim values 1571 /// Fill the prim command with prim values
1599 /// </summary> 1572 /// </summary>
1600 /// <param name="row"></param> 1573 /// <param name="row"></param>