diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 537ec85..f743663 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 | ||
@@ -704,7 +706,8 @@ namespace OpenSim.Data.MySQL | |||
704 | "UserLocationX, UserLocationY, UserLocationZ, " + | 706 | "UserLocationX, UserLocationY, UserLocationZ, " + |
705 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + | 707 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + |
706 | "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + | 708 | "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + |
707 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + | 709 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia, " + |
710 | "SeeAVs, AnyAVSounds, GroupAVSounds) values (" + | ||
708 | "?UUID, ?RegionUUID, " + | 711 | "?UUID, ?RegionUUID, " + |
709 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + | 712 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + |
710 | "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + | 713 | "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + |
@@ -715,7 +718,8 @@ namespace OpenSim.Data.MySQL | |||
715 | "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + | 718 | "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + |
716 | "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + | 719 | "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + |
717 | "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ | 720 | "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ |
718 | "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; | 721 | "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia, " + |
722 | "?SeeAVs, ?AnyAVSounds, ?GroupAVSounds)"; | ||
719 | 723 | ||
720 | FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); | 724 | FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); |
721 | 725 | ||
@@ -1320,7 +1324,16 @@ namespace OpenSim.Data.MySQL | |||
1320 | 1324 | ||
1321 | if (!(row["MediaURL"] is System.DBNull)) | 1325 | if (!(row["MediaURL"] is System.DBNull)) |
1322 | prim.MediaUrl = (string)row["MediaURL"]; | 1326 | prim.MediaUrl = (string)row["MediaURL"]; |
1323 | 1327 | ||
1328 | if (!(row["AttachedPosX"] is System.DBNull)) | ||
1329 | { | ||
1330 | prim.AttachedPos = new Vector3( | ||
1331 | (float)(double)row["AttachedPosX"], | ||
1332 | (float)(double)row["AttachedPosY"], | ||
1333 | (float)(double)row["AttachedPosZ"] | ||
1334 | ); | ||
1335 | } | ||
1336 | |||
1324 | if (!(row["DynAttrs"] is System.DBNull)) | 1337 | if (!(row["DynAttrs"] is System.DBNull)) |
1325 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); | 1338 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); |
1326 | else | 1339 | else |
@@ -1533,6 +1546,13 @@ namespace OpenSim.Data.MySQL | |||
1533 | 1546 | ||
1534 | newData.ParcelAccessList = new List<LandAccessEntry>(); | 1547 | newData.ParcelAccessList = new List<LandAccessEntry>(); |
1535 | 1548 | ||
1549 | if (!(row["SeeAVs"] is System.DBNull)) | ||
1550 | newData.SeeAVs = Convert.ToInt32(row["SeeAVs"]) != 0 ? true : false; | ||
1551 | if (!(row["AnyAVSounds"] is System.DBNull)) | ||
1552 | newData.AnyAVSounds = Convert.ToInt32(row["AnyAVSounds"]) != 0 ? true : false; | ||
1553 | if (!(row["GroupAVSounds"] is System.DBNull)) | ||
1554 | newData.GroupAVSounds = Convert.ToInt32(row["GroupAVSounds"]) != 0 ? true : false; | ||
1555 | |||
1536 | return newData; | 1556 | return newData; |
1537 | } | 1557 | } |
1538 | 1558 | ||
@@ -1719,6 +1739,12 @@ namespace OpenSim.Data.MySQL | |||
1719 | 1739 | ||
1720 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); | 1740 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); |
1721 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); | 1741 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); |
1742 | if (prim.AttachedPos != null) | ||
1743 | { | ||
1744 | cmd.Parameters.AddWithValue("AttachedPosX", (double)prim.AttachedPos.X); | ||
1745 | cmd.Parameters.AddWithValue("AttachedPosY", (double)prim.AttachedPos.Y); | ||
1746 | cmd.Parameters.AddWithValue("AttachedPosZ", (double)prim.AttachedPos.Z); | ||
1747 | } | ||
1722 | 1748 | ||
1723 | if (prim.KeyframeMotion != null) | 1749 | if (prim.KeyframeMotion != null) |
1724 | cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); | 1750 | cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); |
@@ -1730,7 +1756,7 @@ namespace OpenSim.Data.MySQL | |||
1730 | else | 1756 | else |
1731 | cmd.Parameters.AddWithValue("Vehicle", String.Empty); | 1757 | cmd.Parameters.AddWithValue("Vehicle", String.Empty); |
1732 | 1758 | ||
1733 | if (prim.DynAttrs.Count > 0) | 1759 | if (prim.DynAttrs.CountNamespaces > 0) |
1734 | cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); | 1760 | cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); |
1735 | else | 1761 | else |
1736 | cmd.Parameters.AddWithValue("DynAttrs", null); | 1762 | cmd.Parameters.AddWithValue("DynAttrs", null); |
@@ -1876,6 +1902,9 @@ namespace OpenSim.Data.MySQL | |||
1876 | cmd.Parameters.AddWithValue("MediaLoop", land.MediaLoop); | 1902 | cmd.Parameters.AddWithValue("MediaLoop", land.MediaLoop); |
1877 | cmd.Parameters.AddWithValue("ObscureMusic", land.ObscureMusic); | 1903 | cmd.Parameters.AddWithValue("ObscureMusic", land.ObscureMusic); |
1878 | cmd.Parameters.AddWithValue("ObscureMedia", land.ObscureMedia); | 1904 | cmd.Parameters.AddWithValue("ObscureMedia", land.ObscureMedia); |
1905 | cmd.Parameters.AddWithValue("SeeAVs", land.SeeAVs ? 1 : 0); | ||
1906 | cmd.Parameters.AddWithValue("AnyAVSounds", land.AnyAVSounds ? 1 : 0); | ||
1907 | cmd.Parameters.AddWithValue("GroupAVSounds", land.GroupAVSounds ? 1 : 0); | ||
1879 | 1908 | ||
1880 | } | 1909 | } |
1881 | 1910 | ||
@@ -1932,6 +1961,7 @@ namespace OpenSim.Data.MySQL | |||
1932 | s.ExtraParams = (byte[])row["ExtraParams"]; | 1961 | s.ExtraParams = (byte[])row["ExtraParams"]; |
1933 | 1962 | ||
1934 | s.State = (byte)(int)row["State"]; | 1963 | s.State = (byte)(int)row["State"]; |
1964 | s.LastAttachPoint = (byte)(int)row["LastAttachPoint"]; | ||
1935 | 1965 | ||
1936 | if (!(row["Media"] is System.DBNull)) | 1966 | if (!(row["Media"] is System.DBNull)) |
1937 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); | 1967 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); |
@@ -1978,6 +2008,7 @@ namespace OpenSim.Data.MySQL | |||
1978 | cmd.Parameters.AddWithValue("Texture", s.TextureEntry); | 2008 | cmd.Parameters.AddWithValue("Texture", s.TextureEntry); |
1979 | cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); | 2009 | cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); |
1980 | cmd.Parameters.AddWithValue("State", s.State); | 2010 | cmd.Parameters.AddWithValue("State", s.State); |
2011 | cmd.Parameters.AddWithValue("LastAttachPoint", s.LastAttachPoint); | ||
1981 | cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); | 2012 | cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); |
1982 | } | 2013 | } |
1983 | 2014 | ||