diff options
author | Aleric Inglewood | 2013-08-04 19:19:11 +0200 |
---|---|---|
committer | teravus | 2013-09-22 21:10:01 -0500 |
commit | 2dc92e7de11086c7649d3ee0f8adc974efce6805 (patch) | |
tree | e69a633127525a5967ddadeef723a99f38e5d4aa /OpenSim/Data | |
parent | minor: Recomment out log message uncommented in previous cbdfe969 (diff) | |
download | opensim-SC_OLD-2dc92e7de11086c7649d3ee0f8adc974efce6805.zip opensim-SC_OLD-2dc92e7de11086c7649d3ee0f8adc974efce6805.tar.gz opensim-SC_OLD-2dc92e7de11086c7649d3ee0f8adc974efce6805.tar.bz2 opensim-SC_OLD-2dc92e7de11086c7649d3ee0f8adc974efce6805.tar.xz |
Preserve attachment point & position when attachment is rezzed in world
Patch taken from
http://opensimulator.org/mantis/view.php?id=4905
originally by Greg C.
Fixed to apply to r/23314 commit
ba9daf849e7c8db48e7c03e7cdedb77776b2052f
(cherry picked from commit 4ff9fbca441110cc2b93edc7286e0e9339e61cbe)
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 12 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 29 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 10 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/RegionStore.migrations | 12 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 16 |
6 files changed, 87 insertions, 9 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 5135050..f41f60c 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -351,7 +351,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID) | |||
351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, | 351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, |
352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, | 352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, |
353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, | 353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, |
354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs, | 354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL, AttachedPosX = @AttachedPosX, AttachedPosY = @AttachedPosY, AttachedPosZ = @AttachedPosZ, DynAttrs = @DynAttrs, |
355 | PhysicsShapeType = @PhysicsShapeType, Density = @Density, GravityModifier = @GravityModifier, Friction = @Friction, Restitution = @Restitution | 355 | PhysicsShapeType = @PhysicsShapeType, Density = @Density, GravityModifier = @GravityModifier, Friction = @Friction, Restitution = @Restitution |
356 | WHERE UUID = @UUID | 356 | WHERE UUID = @UUID |
357 | END | 357 | END |
@@ -367,7 +367,7 @@ ELSE | |||
367 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, | 367 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, |
368 | OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, | 368 | OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, |
369 | ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, | 369 | ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, |
370 | ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL, DynAttrs, | 370 | ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL, AttachedPosX, AttachedPosY, AttachedPosZ, DynAttrs, |
371 | PhysicsShapeType, Density, GravityModifier, Friction, Restitution | 371 | PhysicsShapeType, Density, GravityModifier, Friction, Restitution |
372 | ) VALUES ( | 372 | ) VALUES ( |
373 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, | 373 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, |
@@ -378,7 +378,7 @@ ELSE | |||
378 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, | 378 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, |
379 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, | 379 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, |
380 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, | 380 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, |
381 | @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL, @DynAttrs, | 381 | @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL, @AttachedPosX, @AttachedPosY, @AttachedPosZ, @DynAttrs, |
382 | @PhysicsShapeType, @Density, @GravityModifier, @Friction, @Restitution | 382 | @PhysicsShapeType, @Density, @GravityModifier, @Friction, @Restitution |
383 | ) | 383 | ) |
384 | END"; | 384 | END"; |
@@ -1695,6 +1695,12 @@ VALUES | |||
1695 | if (!(primRow["MediaURL"] is System.DBNull)) | 1695 | if (!(primRow["MediaURL"] is System.DBNull)) |
1696 | prim.MediaUrl = (string)primRow["MediaURL"]; | 1696 | prim.MediaUrl = (string)primRow["MediaURL"]; |
1697 | 1697 | ||
1698 | if (!(primRow["AttachedPosX"] is System.DBNull)) | ||
1699 | prim.AttachedPos = new Vector3( | ||
1700 | Convert.ToSingle(primRow["AttachedPosX"]), | ||
1701 | Convert.ToSingle(primRow["AttachedPosY"]), | ||
1702 | Convert.ToSingle(primRow["AttachedPosZ"])); | ||
1703 | |||
1698 | if (!(primRow["DynAttrs"] is System.DBNull)) | 1704 | if (!(primRow["DynAttrs"] is System.DBNull)) |
1699 | prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); | 1705 | prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); |
1700 | else | 1706 | else |
@@ -2099,7 +2105,10 @@ VALUES | |||
2099 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); | 2105 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); |
2100 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 2106 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
2101 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); | 2107 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); |
2102 | 2108 | parameters.Add(_Database.CreateParameter("AttachedPosX", prim.AttachedPos.X)); | |
2109 | parameters.Add(_Database.CreateParameter("AttachedPosY", prim.AttachedPos.Y)); | ||
2110 | parameters.Add(_Database.CreateParameter("AttachedPosZ", prim.AttachedPos.Z)); | ||
2111 | |||
2103 | if (prim.DynAttrs.CountNamespaces > 0) | 2112 | if (prim.DynAttrs.CountNamespaces > 0) |
2104 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | 2113 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); |
2105 | else | 2114 | else |
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index 4549801..bb89884 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations | |||
@@ -1168,3 +1168,15 @@ ALTER TABLE prims ADD `Friction` double NOT NULL default '0.6'; | |||
1168 | ALTER TABLE prims ADD `Restitution` double NOT NULL default '0.5'; | 1168 | ALTER TABLE prims ADD `Restitution` double NOT NULL default '0.5'; |
1169 | 1169 | ||
1170 | COMMIT | 1170 | COMMIT |
1171 | |||
1172 | :VERSION 40 #---------------- Save Attachment info | ||
1173 | |||
1174 | BEGIN TRANSACTION | ||
1175 | |||
1176 | ALTER TABLE prims ADD AttachedPosX float(53) default 0.0; | ||
1177 | ALTER TABLE prims ADD AttachedPosY float(53) default 0.0; | ||
1178 | ALTER TABLE prims ADD AttachedPosZ float(53) default 0.0; | ||
1179 | ALTER TABLE primshapes ADD LastAttachPoint int not null default 0; | ||
1180 | |||
1181 | COMMIT | ||
1182 | |||
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index cf367ef..b03a904 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -173,7 +173,8 @@ namespace OpenSim.Data.MySQL | |||
173 | "ParticleSystem, ClickAction, Material, " + | 173 | "ParticleSystem, ClickAction, Material, " + |
174 | "CollisionSound, CollisionSoundVolume, " + | 174 | "CollisionSound, CollisionSoundVolume, " + |
175 | "PassTouches, " + | 175 | "PassTouches, " + |
176 | "LinkNumber, MediaURL, KeyframeMotion, " + | 176 | "LinkNumber, MediaURL, AttachedPosX, " + |
177 | "AttachedPosY, AttachedPosZ, KeyframeMotion, " + | ||
177 | "PhysicsShapeType, Density, GravityModifier, " + | 178 | "PhysicsShapeType, Density, GravityModifier, " + |
178 | "Friction, Restitution, DynAttrs " + | 179 | "Friction, Restitution, DynAttrs " + |
179 | ") values (" + "?UUID, " + | 180 | ") values (" + "?UUID, " + |
@@ -208,7 +209,8 @@ namespace OpenSim.Data.MySQL | |||
208 | "?ColorB, ?ColorA, ?ParticleSystem, " + | 209 | "?ColorB, ?ColorA, ?ParticleSystem, " + |
209 | "?ClickAction, ?Material, ?CollisionSound, " + | 210 | "?ClickAction, ?Material, ?CollisionSound, " + |
210 | "?CollisionSoundVolume, ?PassTouches, " + | 211 | "?CollisionSoundVolume, ?PassTouches, " + |
211 | "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + | 212 | "?LinkNumber, ?MediaURL, ?AttachedPosX, " + |
213 | "?AttachedPosY, ?AttachedPosZ, ?KeyframeMotion, " + | ||
212 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + | 214 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + |
213 | "?Friction, ?Restitution, ?DynAttrs)"; | 215 | "?Friction, ?Restitution, ?DynAttrs)"; |
214 | 216 | ||
@@ -227,7 +229,7 @@ namespace OpenSim.Data.MySQL | |||
227 | "PathTaperX, PathTaperY, PathTwist, " + | 229 | "PathTaperX, PathTaperY, PathTwist, " + |
228 | "PathTwistBegin, ProfileBegin, ProfileEnd, " + | 230 | "PathTwistBegin, ProfileBegin, ProfileEnd, " + |
229 | "ProfileCurve, ProfileHollow, Texture, " + | 231 | "ProfileCurve, ProfileHollow, Texture, " + |
230 | "ExtraParams, State, Media) " + | 232 | "ExtraParams, State, LastAttachPoint, Media) " + |
231 | "values (?UUID, " + | 233 | "values (?UUID, " + |
232 | "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + | 234 | "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + |
233 | "?PCode, ?PathBegin, ?PathEnd, " + | 235 | "?PCode, ?PathBegin, ?PathEnd, " + |
@@ -239,7 +241,7 @@ namespace OpenSim.Data.MySQL | |||
239 | "?PathTwistBegin, ?ProfileBegin, " + | 241 | "?PathTwistBegin, ?ProfileBegin, " + |
240 | "?ProfileEnd, ?ProfileCurve, " + | 242 | "?ProfileEnd, ?ProfileCurve, " + |
241 | "?ProfileHollow, ?Texture, ?ExtraParams, " + | 243 | "?ProfileHollow, ?Texture, ?ExtraParams, " + |
242 | "?State, ?Media)"; | 244 | "?State, ?LastAttachPoint, ?Media)"; |
243 | 245 | ||
244 | FillShapeCommand(cmd, prim); | 246 | FillShapeCommand(cmd, prim); |
245 | 247 | ||
@@ -1303,7 +1305,16 @@ namespace OpenSim.Data.MySQL | |||
1303 | 1305 | ||
1304 | if (!(row["MediaURL"] is System.DBNull)) | 1306 | if (!(row["MediaURL"] is System.DBNull)) |
1305 | prim.MediaUrl = (string)row["MediaURL"]; | 1307 | prim.MediaUrl = (string)row["MediaURL"]; |
1306 | 1308 | ||
1309 | if (!(row["AttachedPosX"] is System.DBNull)) | ||
1310 | { | ||
1311 | prim.AttachedPos = new Vector3( | ||
1312 | (float)(double)row["AttachedPosX"], | ||
1313 | (float)(double)row["AttachedPosY"], | ||
1314 | (float)(double)row["AttachedPosZ"] | ||
1315 | ); | ||
1316 | } | ||
1317 | |||
1307 | if (!(row["DynAttrs"] is System.DBNull)) | 1318 | if (!(row["DynAttrs"] is System.DBNull)) |
1308 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); | 1319 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); |
1309 | else | 1320 | else |
@@ -1673,6 +1684,12 @@ namespace OpenSim.Data.MySQL | |||
1673 | 1684 | ||
1674 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); | 1685 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); |
1675 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); | 1686 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); |
1687 | if (prim.AttachedPos != null) | ||
1688 | { | ||
1689 | cmd.Parameters.AddWithValue("AttachedPosX", (double)prim.AttachedPos.X); | ||
1690 | cmd.Parameters.AddWithValue("AttachedPosY", (double)prim.AttachedPos.Y); | ||
1691 | cmd.Parameters.AddWithValue("AttachedPosZ", (double)prim.AttachedPos.Z); | ||
1692 | } | ||
1676 | 1693 | ||
1677 | if (prim.KeyframeMotion != null) | 1694 | if (prim.KeyframeMotion != null) |
1678 | cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); | 1695 | cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); |
@@ -1879,6 +1896,7 @@ namespace OpenSim.Data.MySQL | |||
1879 | s.ExtraParams = (byte[])row["ExtraParams"]; | 1896 | s.ExtraParams = (byte[])row["ExtraParams"]; |
1880 | 1897 | ||
1881 | s.State = (byte)(int)row["State"]; | 1898 | s.State = (byte)(int)row["State"]; |
1899 | s.LastAttachPoint = (byte)(int)row["LastAttachPoint"]; | ||
1882 | 1900 | ||
1883 | if (!(row["Media"] is System.DBNull)) | 1901 | if (!(row["Media"] is System.DBNull)) |
1884 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); | 1902 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); |
@@ -1925,6 +1943,7 @@ namespace OpenSim.Data.MySQL | |||
1925 | cmd.Parameters.AddWithValue("Texture", s.TextureEntry); | 1943 | cmd.Parameters.AddWithValue("Texture", s.TextureEntry); |
1926 | cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); | 1944 | cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); |
1927 | cmd.Parameters.AddWithValue("State", s.State); | 1945 | cmd.Parameters.AddWithValue("State", s.State); |
1946 | cmd.Parameters.AddWithValue("LastAttachPoint", s.LastAttachPoint); | ||
1928 | cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); | 1947 | cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); |
1929 | } | 1948 | } |
1930 | 1949 | ||
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 70b9558..a77e44d 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -930,3 +930,13 @@ BEGIN; | |||
930 | ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob; | 930 | ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob; |
931 | 931 | ||
932 | COMMIT; | 932 | COMMIT; |
933 | |||
934 | :VERSION 49 #--------------------- Save attachment info | ||
935 | |||
936 | BEGIN; | ||
937 | ALTER TABLE prims ADD COLUMN AttachedPosX double default 0; | ||
938 | ALTER TABLE prims ADD COLUMN AttachedPosY double default 0; | ||
939 | ALTER TABLE prims ADD COLUMN AttachedPosZ double default 0; | ||
940 | ALTER TABLE primshapes ADD COLUMN LastAttachPoint int(4) not null default '0'; | ||
941 | COMMIT; | ||
942 | |||
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index bff039d..901068f 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations | |||
@@ -600,3 +600,15 @@ BEGIN; | |||
600 | ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob; | 600 | ALTER TABLE prims ADD COLUMN `KeyframeMotion` blob; |
601 | 601 | ||
602 | COMMIT; | 602 | COMMIT; |
603 | |||
604 | :VERSION 30 #---------------- Save Attachment info | ||
605 | |||
606 | BEGIN; | ||
607 | |||
608 | ALTER TABLE prims ADD COLUMN AttachedPosX double default '0'; | ||
609 | ALTER TABLE prims ADD COLUMN AttachedPosY double default '0'; | ||
610 | ALTER TABLE prims ADD COLUMN AttachedPosZ double default '0'; | ||
611 | ALTER TABLE primshapes ADD COLUMN LastAttachPoint int not null default '0'; | ||
612 | |||
613 | COMMIT; | ||
614 | |||
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index eba6612..d938b6b 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -1236,6 +1236,10 @@ namespace OpenSim.Data.SQLite | |||
1236 | 1236 | ||
1237 | createCol(prims, "MediaURL", typeof(String)); | 1237 | createCol(prims, "MediaURL", typeof(String)); |
1238 | 1238 | ||
1239 | createCol(prims, "AttachedPosX", typeof(Double)); | ||
1240 | createCol(prims, "AttachedPosY", typeof(Double)); | ||
1241 | createCol(prims, "AttachedPosZ", typeof(Double)); | ||
1242 | |||
1239 | createCol(prims, "DynAttrs", typeof(String)); | 1243 | createCol(prims, "DynAttrs", typeof(String)); |
1240 | 1244 | ||
1241 | createCol(prims, "PhysicsShapeType", typeof(Byte)); | 1245 | createCol(prims, "PhysicsShapeType", typeof(Byte)); |
@@ -1724,6 +1728,12 @@ namespace OpenSim.Data.SQLite | |||
1724 | prim.MediaUrl = (string)row["MediaURL"]; | 1728 | prim.MediaUrl = (string)row["MediaURL"]; |
1725 | } | 1729 | } |
1726 | 1730 | ||
1731 | prim.AttachedPos = new Vector3( | ||
1732 | Convert.ToSingle(row["AttachedPosX"]), | ||
1733 | Convert.ToSingle(row["AttachedPosY"]), | ||
1734 | Convert.ToSingle(row["AttachedPosZ"]) | ||
1735 | ); | ||
1736 | |||
1727 | if (!(row["DynAttrs"] is System.DBNull)) | 1737 | if (!(row["DynAttrs"] is System.DBNull)) |
1728 | { | 1738 | { |
1729 | //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType()); | 1739 | //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType()); |
@@ -2176,6 +2186,10 @@ namespace OpenSim.Data.SQLite | |||
2176 | 2186 | ||
2177 | row["MediaURL"] = prim.MediaUrl; | 2187 | row["MediaURL"] = prim.MediaUrl; |
2178 | 2188 | ||
2189 | row["AttachedPosX"] = prim.AttachedPos.X; | ||
2190 | row["AttachedPosY"] = prim.AttachedPos.Y; | ||
2191 | row["AttachedPosZ"] = prim.AttachedPos.Z; | ||
2192 | |||
2179 | if (prim.DynAttrs.CountNamespaces > 0) | 2193 | if (prim.DynAttrs.CountNamespaces > 0) |
2180 | row["DynAttrs"] = prim.DynAttrs.ToXml(); | 2194 | row["DynAttrs"] = prim.DynAttrs.ToXml(); |
2181 | else | 2195 | else |
@@ -2444,6 +2458,7 @@ namespace OpenSim.Data.SQLite | |||
2444 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); | 2458 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); |
2445 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 2459 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
2446 | s.State = Convert.ToByte(row["State"]); | 2460 | s.State = Convert.ToByte(row["State"]); |
2461 | s.LastAttachPoint = Convert.ToByte(row["LastAttachPoint"]); | ||
2447 | 2462 | ||
2448 | byte[] textureEntry = (byte[])row["Texture"]; | 2463 | byte[] textureEntry = (byte[])row["Texture"]; |
2449 | s.TextureEntry = textureEntry; | 2464 | s.TextureEntry = textureEntry; |
@@ -2493,6 +2508,7 @@ namespace OpenSim.Data.SQLite | |||
2493 | row["ProfileCurve"] = s.ProfileCurve; | 2508 | row["ProfileCurve"] = s.ProfileCurve; |
2494 | row["ProfileHollow"] = s.ProfileHollow; | 2509 | row["ProfileHollow"] = s.ProfileHollow; |
2495 | row["State"] = s.State; | 2510 | row["State"] = s.State; |
2511 | row["LastAttachPoint"] = s.LastAttachPoint; | ||
2496 | 2512 | ||
2497 | row["Texture"] = s.TextureEntry; | 2513 | row["Texture"] = s.TextureEntry; |
2498 | row["ExtraParams"] = s.ExtraParams; | 2514 | row["ExtraParams"] = s.ExtraParams; |