aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie2012-07-07 02:05:01 +0200
committerMelanie2012-07-07 02:05:01 +0200
commit6535f23e4b8fec9578dae5275db69b237a99e498 (patch)
treefcf5495a3ebc005812c377076def18d1bafa5bab /OpenSim/Data/MySQL
parent added llSetVelocity. will refuse to work on vehicles and on attachments ( th... (diff)
downloadopensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.zip
opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.gz
opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.bz2
opensim-SC-6535f23e4b8fec9578dae5275db69b237a99e498.tar.xz
Add saving vehicle physics data to the database
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 5e4df3a..fecc329 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -175,7 +175,8 @@ namespace OpenSim.Data.MySQL
175 "PassCollisions, " + 175 "PassCollisions, " +
176 "LinkNumber, MediaURL, KeyframeMotion, " + 176 "LinkNumber, MediaURL, KeyframeMotion, " +
177 "PhysicsShapeType, Density, GravityModifier, " + 177 "PhysicsShapeType, Density, GravityModifier, " +
178 "Friction, Restitution) values (" + "?UUID, " + 178 "Friction, Restitution, Vehicle " +
179 ") values (" + "?UUID, " +
179 "?CreationDate, ?Name, ?Text, " + 180 "?CreationDate, ?Name, ?Text, " +
180 "?Description, ?SitName, ?TouchName, " + 181 "?Description, ?SitName, ?TouchName, " +
181 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + 182 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
@@ -209,7 +210,7 @@ namespace OpenSim.Data.MySQL
209 "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " + 210 "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " +
210 "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + 211 "?LinkNumber, ?MediaURL, ?KeyframeMotion, " +
211 "?PhysicsShapeType, ?Density, ?GravityModifier, " + 212 "?PhysicsShapeType, ?Density, ?GravityModifier, " +
212 "?Friction, ?Restitution)"; 213 "?Friction, ?Restitution, ?Vehicle)";
213 214
214 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 215 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
215 216
@@ -1258,6 +1259,15 @@ namespace OpenSim.Data.MySQL
1258 prim.GravityModifier = (float)(double)row["GravityModifier"]; 1259 prim.GravityModifier = (float)(double)row["GravityModifier"];
1259 prim.Friction = (float)(double)row["Friction"]; 1260 prim.Friction = (float)(double)row["Friction"];
1260 prim.Bounciness = (float)(double)row["Restitution"]; 1261 prim.Bounciness = (float)(double)row["Restitution"];
1262
1263 SOPVehicle vehicle = null;
1264
1265 if (row["Vehicle"].ToString() != String.Empty)
1266 {
1267 vehicle = SOPVehicle.FromXml2(row["Vehicle"].ToString());
1268 if (vehicle != null)
1269 prim.VehicleParams = vehicle;
1270 }
1261 1271
1262 return prim; 1272 return prim;
1263 } 1273 }
@@ -1635,6 +1645,11 @@ namespace OpenSim.Data.MySQL
1635 cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); 1645 cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
1636 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); 1646 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
1637 cmd.Parameters.AddWithValue("Restitution", (double)prim.Bounciness); 1647 cmd.Parameters.AddWithValue("Restitution", (double)prim.Bounciness);
1648
1649 if (prim.VehicleParams != null)
1650 {
1651 cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2());
1652 }
1638 } 1653 }
1639 1654
1640 /// <summary> 1655 /// <summary>