aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-12-28 18:44:33 +0000
committerUbitUmarov2018-12-28 18:44:33 +0000
commit650cef67d184e3f7752d56f710bf58f82b381be3 (patch)
tree85564ff0e9661255853abfd677154f983df24587 /OpenSim/Data/PGSQL/PGSQLSimulationData.cs
parentadd some LSL (diff)
downloadopensim-SC-650cef67d184e3f7752d56f710bf58f82b381be3.zip
opensim-SC-650cef67d184e3f7752d56f710bf58f82b381be3.tar.gz
opensim-SC-650cef67d184e3f7752d56f710bf58f82b381be3.tar.bz2
opensim-SC-650cef67d184e3f7752d56f710bf58f82b381be3.tar.xz
PGSQL: store vehicle data
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs')
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLSimulationData.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index f4af40b..fa8bb30 100755
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -1805,8 +1805,15 @@ namespace OpenSim.Data.PGSQL
1805 prim.Friction = Convert.ToSingle(primRow["Friction"]); 1805 prim.Friction = Convert.ToSingle(primRow["Friction"]);
1806 prim.Restitution = Convert.ToSingle(primRow["Restitution"]); 1806 prim.Restitution = Convert.ToSingle(primRow["Restitution"]);
1807 prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); 1807 prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]);
1808 1808
1809 1809 SOPVehicle vehicle = null;
1810 if (!(primRow["Vehicle"] is System.DBNull))
1811 {
1812 vehicle = SOPVehicle.FromXml2(primRow["Vehicle"].ToString());
1813 if (vehicle != null)
1814 prim.VehicleParams = vehicle;
1815 }
1816
1810 PhysicsInertiaData pdata = null; 1817 PhysicsInertiaData pdata = null;
1811 if (!(primRow["PhysInertia"] is System.DBNull)) 1818 if (!(primRow["PhysInertia"] is System.DBNull))
1812 pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); 1819 pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString());
@@ -2214,8 +2221,7 @@ namespace OpenSim.Data.PGSQL
2214 2221
2215 parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches)); 2222 parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches));
2216 parameters.Add(_Database.CreateParameter("PassCollisions", (bool)prim.PassCollisions)); 2223 parameters.Add(_Database.CreateParameter("PassCollisions", (bool)prim.PassCollisions));
2217 2224
2218
2219 if (prim.PassTouches) 2225 if (prim.PassTouches)
2220 parameters.Add(_Database.CreateParameter("PassTouches", true)); 2226 parameters.Add(_Database.CreateParameter("PassTouches", true));
2221 else 2227 else
@@ -2228,13 +2234,17 @@ namespace OpenSim.Data.PGSQL
2228 2234
2229 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); 2235 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
2230 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); 2236 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
2231 2237
2238 if (prim.VehicleParams != null)
2239 parameters.Add(_Database.CreateParameter("Vehicle", prim.VehicleParams.ToXml2()));
2240 else
2241 parameters.Add(_Database.CreateParameter("Vehicle", String.Empty));
2242
2232 if (prim.PhysicsInertia != null) 2243 if (prim.PhysicsInertia != null)
2233 parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2())); 2244 parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2()));
2234 else 2245 else
2235 parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty)); 2246 parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty));
2236 2247
2237
2238 if (prim.DynAttrs.CountNamespaces > 0) 2248 if (prim.DynAttrs.CountNamespaces > 0)
2239 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); 2249 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
2240 else 2250 else