diff options
author | UbitUmarov | 2017-04-01 18:15:47 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-01 18:15:47 +0100 |
commit | 44993550a85f411e5ea88a889fb652744e2d3d1b (patch) | |
tree | 3a3313767f8a061e7e786b38b53aacfe594ad924 /OpenSim | |
parent | store the physics inertia override in Mysql and add it to serializer. run p... (diff) | |
download | opensim-SC-44993550a85f411e5ea88a889fb652744e2d3d1b.zip opensim-SC-44993550a85f411e5ea88a889fb652744e2d3d1b.tar.gz opensim-SC-44993550a85f411e5ea88a889fb652744e2d3d1b.tar.bz2 opensim-SC-44993550a85f411e5ea88a889fb652744e2d3d1b.tar.xz |
store the physics inertia override in SQlite
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/RegionStore.migrations | 6 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 11 |
3 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 97a433f..5740b91 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1452,13 +1452,10 @@ namespace OpenSim.Data.MySQL | |||
1452 | prim.VehicleParams = vehicle; | 1452 | prim.VehicleParams = vehicle; |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | PhysicsInertiaData pdata; | 1455 | PhysicsInertiaData pdata = null; |
1456 | if (row["PhysInertia"].ToString() != String.Empty) | 1456 | if (row["PhysInertia"].ToString() != String.Empty) |
1457 | { | ||
1458 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); | 1457 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); |
1459 | if (pdata != null) | 1458 | prim.PhysicsInertia = pdata; |
1460 | prim.PhysicsInertia = pdata; | ||
1461 | } | ||
1462 | 1459 | ||
1463 | return prim; | 1460 | return prim; |
1464 | } | 1461 | } |
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index eef14d6..fb154cf 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations | |||
@@ -371,3 +371,9 @@ BEGIN; | |||
371 | ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL; | 371 | ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL; |
372 | 372 | ||
373 | COMMIT; | 373 | COMMIT; |
374 | |||
375 | :VERSION 36 #----- Add physics inertia data | ||
376 | |||
377 | BEGIN; | ||
378 | ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL; | ||
379 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index eec386f..19880de 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -1843,6 +1843,12 @@ namespace OpenSim.Data.SQLite | |||
1843 | if (vehicle != null) | 1843 | if (vehicle != null) |
1844 | prim.VehicleParams = vehicle; | 1844 | prim.VehicleParams = vehicle; |
1845 | } | 1845 | } |
1846 | |||
1847 | PhysicsInertiaData pdata = null; | ||
1848 | if (!(row["PhysInertia"] is DBNull) && row["PhysInertia"].ToString() != String.Empty) | ||
1849 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); | ||
1850 | prim.PhysicsInertia = pdata; | ||
1851 | |||
1846 | return prim; | 1852 | return prim; |
1847 | } | 1853 | } |
1848 | 1854 | ||
@@ -2266,6 +2272,11 @@ namespace OpenSim.Data.SQLite | |||
2266 | else | 2272 | else |
2267 | row["Vehicle"] = String.Empty; | 2273 | row["Vehicle"] = String.Empty; |
2268 | 2274 | ||
2275 | if (prim.PhysicsInertia != null) | ||
2276 | row["PhysInertia"] = prim.PhysicsInertia.ToXml2(); | ||
2277 | else | ||
2278 | row["PhysInertia"] = String.Empty; | ||
2279 | |||
2269 | } | 2280 | } |
2270 | 2281 | ||
2271 | /// <summary> | 2282 | /// <summary> |