aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs50
1 files changed, 41 insertions, 9 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 537ec85..cc844ae 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -174,7 +174,8 @@ namespace OpenSim.Data.MySQL
174 "CollisionSound, CollisionSoundVolume, " + 174 "CollisionSound, CollisionSoundVolume, " +
175 "PassTouches, " + 175 "PassTouches, " +
176 "PassCollisions, " + 176 "PassCollisions, " +
177 "LinkNumber, MediaURL, KeyframeMotion, " + 177 "LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " +
178 "AttachedPosY, AttachedPosZ, " +
178 "PhysicsShapeType, Density, GravityModifier, " + 179 "PhysicsShapeType, Density, GravityModifier, " +
179 "Friction, Restitution, Vehicle, DynAttrs " + 180 "Friction, Restitution, Vehicle, DynAttrs " +
180 ") values (" + "?UUID, " + 181 ") values (" + "?UUID, " +
@@ -209,7 +210,8 @@ namespace OpenSim.Data.MySQL
209 "?ColorB, ?ColorA, ?ParticleSystem, " + 210 "?ColorB, ?ColorA, ?ParticleSystem, " +
210 "?ClickAction, ?Material, ?CollisionSound, " + 211 "?ClickAction, ?Material, ?CollisionSound, " +
211 "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " + 212 "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " +
212 "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + 213 "?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " +
214 "?AttachedPosY, ?AttachedPosZ, " +
213 "?PhysicsShapeType, ?Density, ?GravityModifier, " + 215 "?PhysicsShapeType, ?Density, ?GravityModifier, " +
214 "?Friction, ?Restitution, ?Vehicle, ?DynAttrs)"; 216 "?Friction, ?Restitution, ?Vehicle, ?DynAttrs)";
215 217
@@ -228,7 +230,7 @@ namespace OpenSim.Data.MySQL
228 "PathTaperX, PathTaperY, PathTwist, " + 230 "PathTaperX, PathTaperY, PathTwist, " +
229 "PathTwistBegin, ProfileBegin, ProfileEnd, " + 231 "PathTwistBegin, ProfileBegin, ProfileEnd, " +
230 "ProfileCurve, ProfileHollow, Texture, " + 232 "ProfileCurve, ProfileHollow, Texture, " +
231 "ExtraParams, State, Media) " + 233 "ExtraParams, State, LastAttachPoint, Media) " +
232 "values (?UUID, " + 234 "values (?UUID, " +
233 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + 235 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
234 "?PCode, ?PathBegin, ?PathEnd, " + 236 "?PCode, ?PathBegin, ?PathEnd, " +
@@ -240,7 +242,7 @@ namespace OpenSim.Data.MySQL
240 "?PathTwistBegin, ?ProfileBegin, " + 242 "?PathTwistBegin, ?ProfileBegin, " +
241 "?ProfileEnd, ?ProfileCurve, " + 243 "?ProfileEnd, ?ProfileCurve, " +
242 "?ProfileHollow, ?Texture, ?ExtraParams, " + 244 "?ProfileHollow, ?Texture, ?ExtraParams, " +
243 "?State, ?Media)"; 245 "?State, ?LastAttachPoint, ?Media)";
244 246
245 FillShapeCommand(cmd, prim); 247 FillShapeCommand(cmd, prim);
246 248
@@ -306,7 +308,8 @@ namespace OpenSim.Data.MySQL
306 /// <param name="uuid">the Item UUID</param> 308 /// <param name="uuid">the Item UUID</param>
307 private void RemoveItems(UUID uuid) 309 private void RemoveItems(UUID uuid)
308 { 310 {
309 lock (m_dbLock) 311 // locked by caller
312// lock (m_dbLock)
310 { 313 {
311 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 314 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
312 { 315 {
@@ -704,7 +707,8 @@ namespace OpenSim.Data.MySQL
704 "UserLocationX, UserLocationY, UserLocationZ, " + 707 "UserLocationX, UserLocationY, UserLocationZ, " +
705 "UserLookAtX, UserLookAtY, UserLookAtZ, " + 708 "UserLookAtX, UserLookAtY, UserLookAtZ, " +
706 "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + 709 "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " +
707 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + 710 "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " +
711 "SeeAVs, AnyAVSounds, GroupAVSounds) values (" +
708 "?UUID, ?RegionUUID, " + 712 "?UUID, ?RegionUUID, " +
709 "?LocalLandID, ?Bitmap, ?Name, ?Description, " + 713 "?LocalLandID, ?Bitmap, ?Name, ?Description, " +
710 "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + 714 "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@@ -715,7 +719,8 @@ namespace OpenSim.Data.MySQL
715 "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + 719 "?UserLocationX, ?UserLocationY, ?UserLocationZ, " +
716 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + 720 "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
717 "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ 721 "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+
718 "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; 722 "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia, " +
723 "?SeeAVs, ?AnyAVSounds, ?GroupAVSounds)";
719 724
720 FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); 725 FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
721 726
@@ -1320,7 +1325,16 @@ namespace OpenSim.Data.MySQL
1320 1325
1321 if (!(row["MediaURL"] is System.DBNull)) 1326 if (!(row["MediaURL"] is System.DBNull))
1322 prim.MediaUrl = (string)row["MediaURL"]; 1327 prim.MediaUrl = (string)row["MediaURL"];
1323 1328
1329 if (!(row["AttachedPosX"] is System.DBNull))
1330 {
1331 prim.AttachedPos = new Vector3(
1332 (float)(double)row["AttachedPosX"],
1333 (float)(double)row["AttachedPosY"],
1334 (float)(double)row["AttachedPosZ"]
1335 );
1336 }
1337
1324 if (!(row["DynAttrs"] is System.DBNull)) 1338 if (!(row["DynAttrs"] is System.DBNull))
1325 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); 1339 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1326 else 1340 else
@@ -1533,6 +1547,13 @@ namespace OpenSim.Data.MySQL
1533 1547
1534 newData.ParcelAccessList = new List<LandAccessEntry>(); 1548 newData.ParcelAccessList = new List<LandAccessEntry>();
1535 1549
1550 if (!(row["SeeAVs"] is System.DBNull))
1551 newData.SeeAVs = Convert.ToInt32(row["SeeAVs"]) != 0 ? true : false;
1552 if (!(row["AnyAVSounds"] is System.DBNull))
1553 newData.AnyAVSounds = Convert.ToInt32(row["AnyAVSounds"]) != 0 ? true : false;
1554 if (!(row["GroupAVSounds"] is System.DBNull))
1555 newData.GroupAVSounds = Convert.ToInt32(row["GroupAVSounds"]) != 0 ? true : false;
1556
1536 return newData; 1557 return newData;
1537 } 1558 }
1538 1559
@@ -1719,6 +1740,12 @@ namespace OpenSim.Data.MySQL
1719 1740
1720 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); 1741 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
1721 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); 1742 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
1743 if (prim.AttachedPos != null)
1744 {
1745 cmd.Parameters.AddWithValue("AttachedPosX", (double)prim.AttachedPos.X);
1746 cmd.Parameters.AddWithValue("AttachedPosY", (double)prim.AttachedPos.Y);
1747 cmd.Parameters.AddWithValue("AttachedPosZ", (double)prim.AttachedPos.Z);
1748 }
1722 1749
1723 if (prim.KeyframeMotion != null) 1750 if (prim.KeyframeMotion != null)
1724 cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); 1751 cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize());
@@ -1730,7 +1757,7 @@ namespace OpenSim.Data.MySQL
1730 else 1757 else
1731 cmd.Parameters.AddWithValue("Vehicle", String.Empty); 1758 cmd.Parameters.AddWithValue("Vehicle", String.Empty);
1732 1759
1733 if (prim.DynAttrs.Count > 0) 1760 if (prim.DynAttrs.CountNamespaces > 0)
1734 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); 1761 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
1735 else 1762 else
1736 cmd.Parameters.AddWithValue("DynAttrs", null); 1763 cmd.Parameters.AddWithValue("DynAttrs", null);
@@ -1876,6 +1903,9 @@ namespace OpenSim.Data.MySQL
1876 cmd.Parameters.AddWithValue("MediaLoop", land.MediaLoop); 1903 cmd.Parameters.AddWithValue("MediaLoop", land.MediaLoop);
1877 cmd.Parameters.AddWithValue("ObscureMusic", land.ObscureMusic); 1904 cmd.Parameters.AddWithValue("ObscureMusic", land.ObscureMusic);
1878 cmd.Parameters.AddWithValue("ObscureMedia", land.ObscureMedia); 1905 cmd.Parameters.AddWithValue("ObscureMedia", land.ObscureMedia);
1906 cmd.Parameters.AddWithValue("SeeAVs", land.SeeAVs ? 1 : 0);
1907 cmd.Parameters.AddWithValue("AnyAVSounds", land.AnyAVSounds ? 1 : 0);
1908 cmd.Parameters.AddWithValue("GroupAVSounds", land.GroupAVSounds ? 1 : 0);
1879 1909
1880 } 1910 }
1881 1911
@@ -1932,6 +1962,7 @@ namespace OpenSim.Data.MySQL
1932 s.ExtraParams = (byte[])row["ExtraParams"]; 1962 s.ExtraParams = (byte[])row["ExtraParams"];
1933 1963
1934 s.State = (byte)(int)row["State"]; 1964 s.State = (byte)(int)row["State"];
1965 s.LastAttachPoint = (byte)(int)row["LastAttachPoint"];
1935 1966
1936 if (!(row["Media"] is System.DBNull)) 1967 if (!(row["Media"] is System.DBNull))
1937 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 1968 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
@@ -1978,6 +2009,7 @@ namespace OpenSim.Data.MySQL
1978 cmd.Parameters.AddWithValue("Texture", s.TextureEntry); 2009 cmd.Parameters.AddWithValue("Texture", s.TextureEntry);
1979 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); 2010 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
1980 cmd.Parameters.AddWithValue("State", s.State); 2011 cmd.Parameters.AddWithValue("State", s.State);
2012 cmd.Parameters.AddWithValue("LastAttachPoint", s.LastAttachPoint);
1981 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); 2013 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
1982 } 2014 }
1983 2015