aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-12-30 22:31:32 +0000
committerUbitUmarov2018-12-30 22:31:32 +0000
commitffca7de65d2c19081899dae75303a3f98833c665 (patch)
treea5b91c89b9421f8ff68ef64eedaf4b139dc5ee56 /OpenSim/Data/MySQL/MySQLSimulationData.cs
parentmantis 8436: fix lludp message (diff)
downloadopensim-SC-ffca7de65d2c19081899dae75303a3f98833c665.zip
opensim-SC-ffca7de65d2c19081899dae75303a3f98833c665.tar.gz
opensim-SC-ffca7de65d2c19081899dae75303a3f98833c665.tar.bz2
opensim-SC-ffca7de65d2c19081899dae75303a3f98833c665.tar.xz
add some persistence (mysql only)
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index e754522..55de192 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Data.MySQL
62 /// </summary> 62 /// </summary>
63 private object m_dbLock = new object(); 63 private object m_dbLock = new object();
64 64
65 protected virtual Assembly Assembly 65 protected Assembly Assembly
66 { 66 {
67 get { return GetType().Assembly; } 67 get { return GetType().Assembly; }
68 } 68 }
@@ -76,7 +76,7 @@ namespace OpenSim.Data.MySQL
76 Initialise(connectionString); 76 Initialise(connectionString);
77 } 77 }
78 78
79 public virtual void Initialise(string connectionString) 79 public void Initialise(string connectionString)
80 { 80 {
81 m_connectionString = connectionString; 81 m_connectionString = connectionString;
82 82
@@ -189,7 +189,7 @@ namespace OpenSim.Data.MySQL
189 "AttachedPosY, AttachedPosZ, " + 189 "AttachedPosY, AttachedPosZ, " +
190 "PhysicsShapeType, Density, GravityModifier, " + 190 "PhysicsShapeType, Density, GravityModifier, " +
191 "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " + 191 "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " +
192 "RotationAxisLocks" + 192 "RotationAxisLocks, sopanims" +
193 ") values (" + "?UUID, " + 193 ") values (" + "?UUID, " +
194 "?CreationDate, ?Name, ?Text, " + 194 "?CreationDate, ?Name, ?Text, " +
195 "?Description, ?SitName, ?TouchName, " + 195 "?Description, ?SitName, ?TouchName, " +
@@ -226,7 +226,7 @@ namespace OpenSim.Data.MySQL
226 "?AttachedPosY, ?AttachedPosZ, " + 226 "?AttachedPosY, ?AttachedPosZ, " +
227 "?PhysicsShapeType, ?Density, ?GravityModifier, " + 227 "?PhysicsShapeType, ?Density, ?GravityModifier, " +
228 "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," + 228 "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," +
229 "?RotationAxisLocks)"; 229 "?RotationAxisLocks, ?sopanims)";
230 230
231 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 231 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
232 232
@@ -1499,6 +1499,19 @@ namespace OpenSim.Data.MySQL
1499 pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); 1499 pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString());
1500 prim.PhysicsInertia = pdata; 1500 prim.PhysicsInertia = pdata;
1501 1501
1502 if (!(row["sopanims"] is DBNull))
1503 {
1504 Byte[] data = (byte[])row["sopanims"];
1505 if (data.Length > 0)
1506 prim.DeSerializeAnimations(data);
1507 else
1508 prim.Animations = null;
1509 }
1510 else
1511 {
1512 prim.Animations = null;
1513 }
1514
1502 return prim; 1515 return prim;
1503 } 1516 }
1504 1517
@@ -1878,6 +1891,11 @@ namespace OpenSim.Data.MySQL
1878 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); 1891 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
1879 cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution); 1892 cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
1880 cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks); 1893 cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks);
1894
1895 if (prim.Animations!= null)
1896 cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations());
1897 else
1898 cmd.Parameters.AddWithValue("sopanims", null);
1881 } 1899 }
1882 1900
1883 /// <summary> 1901 /// <summary>