store the new variables on mysql

master
UbitUmarov 2020-01-22 21:32:40 +00:00
parent da0ba17d1a
commit 33eabf1069
2 changed files with 44 additions and 19 deletions

View File

@ -154,16 +154,15 @@ namespace OpenSim.Data.MySQL
"Name, Text, Description, " + "Name, Text, Description, " +
"SitName, TouchName, ObjectFlags, " + "SitName, TouchName, ObjectFlags, " +
"OwnerMask, NextOwnerMask, GroupMask, " + "OwnerMask, NextOwnerMask, GroupMask, " +
"EveryoneMask, BaseMask, PositionX, " + "EveryoneMask, BaseMask, " +
"PositionY, PositionZ, GroupPositionX, " + "PositionX, PositionY, PositionZ, " +
"GroupPositionY, GroupPositionZ, VelocityX, " + "GroupPositionX, GroupPositionY, GroupPositionZ, " +
"VelocityY, VelocityZ, AngularVelocityX, " + "VelocityX, VelocityY, VelocityZ, " +
"AngularVelocityY, AngularVelocityZ, " + "AngularVelocityX, AngularVelocityY, AngularVelocityZ, " +
"AccelerationX, AccelerationY, " + "AccelerationX, AccelerationY, AccelerationZ, " +
"AccelerationZ, RotationX, " + "standtargetx, standtargety, standtargetz, " +
"RotationY, RotationZ, " + "RotationX, RotationY, RotationZ, RotationW, " +
"RotationW, SitTargetOffsetX, " + "SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, " +
"SitTargetOffsetY, SitTargetOffsetZ, " +
"SitTargetOrientW, SitTargetOrientX, " + "SitTargetOrientW, SitTargetOrientX, " +
"SitTargetOrientY, SitTargetOrientZ, " + "SitTargetOrientY, SitTargetOrientZ, " +
"RegionUUID, CreatorID, " + "RegionUUID, CreatorID, " +
@ -189,20 +188,19 @@ namespace OpenSim.Data.MySQL
"AttachedPosY, AttachedPosZ, " + "AttachedPosY, AttachedPosZ, " +
"PhysicsShapeType, Density, GravityModifier, " + "PhysicsShapeType, Density, GravityModifier, " +
"Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " + "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " +
"RotationAxisLocks, sopanims" + "RotationAxisLocks, sopanims, sitactrange" +
") values (" + "?UUID, " + ") values (" + "?UUID, " +
"?CreationDate, ?Name, ?Text, " + "?CreationDate, ?Name, ?Text, " +
"?Description, ?SitName, ?TouchName, " + "?Description, ?SitName, ?TouchName, " +
"?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
"?GroupMask, ?EveryoneMask, ?BaseMask, " + "?GroupMask, ?EveryoneMask, ?BaseMask, " +
"?PositionX, ?PositionY, ?PositionZ, " + "?PositionX, ?PositionY, ?PositionZ, " +
"?GroupPositionX, ?GroupPositionY, " + "?GroupPositionX, ?GroupPositionY, ?GroupPositionZ, " +
"?GroupPositionZ, ?VelocityX, " + "?VelocityX, ?VelocityY, ?VelocityZ, "+
"?VelocityY, ?VelocityZ, ?AngularVelocityX, " + "?AngularVelocityX, ?AngularVelocityY, ?AngularVelocityZ, " +
"?AngularVelocityY, ?AngularVelocityZ, " + "?AccelerationX, ?AccelerationY, ?AccelerationZ, " +
"?AccelerationX, ?AccelerationY, " + "?standtargetx, ?standtargety, ?standtargetz, " +
"?AccelerationZ, ?RotationX, " + "?RotationX, ?RotationY, ?RotationZ, " +
"?RotationY, ?RotationZ, " +
"?RotationW, ?SitTargetOffsetX, " + "?RotationW, ?SitTargetOffsetX, " +
"?SitTargetOffsetY, ?SitTargetOffsetZ, " + "?SitTargetOffsetY, ?SitTargetOffsetZ, " +
"?SitTargetOrientW, ?SitTargetOrientX, " + "?SitTargetOrientW, ?SitTargetOrientX, " +
@ -226,7 +224,7 @@ namespace OpenSim.Data.MySQL
"?AttachedPosY, ?AttachedPosZ, " + "?AttachedPosY, ?AttachedPosZ, " +
"?PhysicsShapeType, ?Density, ?GravityModifier, " + "?PhysicsShapeType, ?Density, ?GravityModifier, " +
"?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," + "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," +
"?RotationAxisLocks, ?sopanims)"; "?RotationAxisLocks, ?sopanims, ?sitactrange)";
FillPrimCommand(cmd, prim, obj.UUID, regionUUID); FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
@ -1395,6 +1393,14 @@ namespace OpenSim.Data.MySQL
(float)(double)row["SitTargetOrientW"] (float)(double)row["SitTargetOrientW"]
); );
prim.StandOffset = new Vector3(
(float)row["standtargetx"],
(float)row["standtargety"],
(float)row["standtargetz"]
);
prim.SitActiveRange = (float)row["sitactrange"];
prim.PayPrice[0] = (int)row["PayPrice"]; prim.PayPrice[0] = (int)row["PayPrice"];
prim.PayPrice[1] = (int)row["PayButton1"]; prim.PayPrice[1] = (int)row["PayButton1"];
prim.PayPrice[2] = (int)row["PayButton2"]; prim.PayPrice[2] = (int)row["PayButton2"];
@ -1515,6 +1521,8 @@ namespace OpenSim.Data.MySQL
prim.Animations = null; prim.Animations = null;
} }
prim.SitActiveRange = (float)row["sitactrange"];
return prim; return prim;
} }
@ -1771,6 +1779,11 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("AccelerationX", (double)prim.Acceleration.X); cmd.Parameters.AddWithValue("AccelerationX", (double)prim.Acceleration.X);
cmd.Parameters.AddWithValue("AccelerationY", (double)prim.Acceleration.Y); cmd.Parameters.AddWithValue("AccelerationY", (double)prim.Acceleration.Y);
cmd.Parameters.AddWithValue("AccelerationZ", (double)prim.Acceleration.Z); cmd.Parameters.AddWithValue("AccelerationZ", (double)prim.Acceleration.Z);
cmd.Parameters.AddWithValue("standtargetx", prim.StandOffset.X);
cmd.Parameters.AddWithValue("standtargety", prim.StandOffset.Y);
cmd.Parameters.AddWithValue("standtargetz", prim.StandOffset.Z);
// quaternions // quaternions
cmd.Parameters.AddWithValue("RotationX", (double)prim.RotationOffset.X); cmd.Parameters.AddWithValue("RotationX", (double)prim.RotationOffset.X);
cmd.Parameters.AddWithValue("RotationY", (double)prim.RotationOffset.Y); cmd.Parameters.AddWithValue("RotationY", (double)prim.RotationOffset.Y);
@ -1899,6 +1912,8 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations()); cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations());
else else
cmd.Parameters.AddWithValue("sopanims", null); cmd.Parameters.AddWithValue("sopanims", null);
cmd.Parameters.AddWithValue("sitactrange", prim.SitActiveRange);
} }
/// <summary> /// <summary>

View File

@ -474,3 +474,13 @@ BEGIN;
ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL; ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL;
COMMIT; COMMIT;
:VERSION 59 #----- Add standtarget and sit range
BEGIN;
ALTER TABLE `prims`
ADD COLUMN `standtargetx` float DEFAULT '0.0',
ADD COLUMN `standtargety` float DEFAULT '0.0',
ADD COLUMN `standtargetz` float DEFAULT '0.0',
ADD COLUMN `sitactrange` float DEFAULT '0.0';
COMMIT;