mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
store the physics inertia override in Mysql and add it to serializer. run prebuild is required
This commit is contained in:
@@ -187,7 +187,7 @@ namespace OpenSim.Data.MySQL
|
||||
"LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " +
|
||||
"AttachedPosY, AttachedPosZ, " +
|
||||
"PhysicsShapeType, Density, GravityModifier, " +
|
||||
"Friction, Restitution, Vehicle, DynAttrs, " +
|
||||
"Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " +
|
||||
"RotationAxisLocks" +
|
||||
") values (" + "?UUID, " +
|
||||
"?CreationDate, ?Name, ?Text, " +
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Data.MySQL
|
||||
"?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " +
|
||||
"?AttachedPosY, ?AttachedPosZ, " +
|
||||
"?PhysicsShapeType, ?Density, ?GravityModifier, " +
|
||||
"?Friction, ?Restitution, ?Vehicle, ?DynAttrs," +
|
||||
"?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," +
|
||||
"?RotationAxisLocks)";
|
||||
|
||||
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
|
||||
@@ -1452,6 +1452,14 @@ namespace OpenSim.Data.MySQL
|
||||
prim.VehicleParams = vehicle;
|
||||
}
|
||||
|
||||
PhysicsInertiaData pdata;
|
||||
if (row["PhysInertia"].ToString() != String.Empty)
|
||||
{
|
||||
pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString());
|
||||
if (pdata != null)
|
||||
prim.PhysicsInertia = pdata;
|
||||
}
|
||||
|
||||
return prim;
|
||||
}
|
||||
|
||||
@@ -1810,6 +1818,11 @@ namespace OpenSim.Data.MySQL
|
||||
else
|
||||
cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]);
|
||||
|
||||
if (prim.PhysicsInertia != null)
|
||||
cmd.Parameters.AddWithValue("PhysInertia", prim.PhysicsInertia.ToXml2());
|
||||
else
|
||||
cmd.Parameters.AddWithValue("PhysInertia", String.Empty);
|
||||
|
||||
if (prim.VehicleParams != null)
|
||||
cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2());
|
||||
else
|
||||
|
||||
@@ -461,3 +461,9 @@ BEGIN;
|
||||
ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL;
|
||||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 57 #----- Add physics inertia data
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL;
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user