Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-06-27 20:05:55 +01:00
commit ba38c697e8
7 changed files with 42 additions and 27 deletions

View File

@ -67,7 +67,6 @@ namespace OpenSim.Data
/// really want is the assembly of your database class.
///
/// </summary>
public class Migration
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -173,8 +172,6 @@ namespace OpenSim.Data
ExecuteScript(_conn, script);
}
public void Update()
{
InitMigrationsTable();
@ -186,8 +183,8 @@ namespace OpenSim.Data
return;
// to prevent people from killing long migrations.
m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!");
m_log.InfoFormat("[MIGRATIONS]: Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
m_log.Info("[MIGRATIONS]: NOTE - this may take a while, don't interrupt this process!");
foreach (KeyValuePair<int, string[]> kvp in migrations)
{
@ -206,7 +203,7 @@ namespace OpenSim.Data
}
catch (Exception e)
{
m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " "));
m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " "));
m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.");
ExecuteScript("ROLLBACK;");
}

View File

@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL
public bool StoreFolder(XInventoryFolder folder)
{
if (folder.folderName.Length > 64)
folder.folderName = folder.folderName.Substring(0, 64);
return m_Folders.Store(folder);
}
public bool StoreItem(XInventoryItem item)
{
if (item.inventoryName.Length > 64)
item.inventoryName = item.inventoryName.Substring(0, 64);
if (item.inventoryDescription.Length > 128)
item.inventoryDescription = item.inventoryDescription.Substring(0, 128);
return m_Items.Store(item);
}
public bool DeleteFolders(string field, string val)
{
return m_Folders.Delete(field, val);

View File

@ -66,11 +66,19 @@ namespace OpenSim.Data.SQLite
public bool StoreFolder(XInventoryFolder folder)
{
if (folder.folderName.Length > 64)
folder.folderName = folder.folderName.Substring(0, 64);
return m_Folders.Store(folder);
}
public bool StoreItem(XInventoryItem item)
{
if (item.inventoryName.Length > 64)
item.inventoryName = item.inventoryName.Substring(0, 64);
if (item.inventoryDescription.Length > 128)
item.inventoryDescription = item.inventoryDescription.Substring(0, 128);
return m_Items.Store(item);
}

View File

@ -134,7 +134,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
{
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
if (kvp.Key != UUID.Zero)
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
}
m_requestCallbackTimer.Enabled = true;
@ -269,7 +270,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
}
catch (Exception e)
{
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e);
m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace);
}
}
@ -285,7 +286,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
catch (Exception e)
{
m_log.ErrorFormat(
"[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e);
"[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}",
e.Message, e.StackTrace);
}
}
}

View File

@ -400,7 +400,7 @@ namespace OpenSim.Region.Framework.Scenes
if (Permissions.PropagatePermissions() && recipient != senderId)
{
// First, make sore base is limited to the next perms
itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions;
itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move);
// By default, current equals base
itemCopy.CurrentPermissions = itemCopy.BasePermissions;
@ -916,7 +916,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
{
agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions;
agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
if (taskItem.InvType == (int)InventoryType.Object)
agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13);
agentItem.CurrentPermissions = agentItem.BasePermissions ;
@ -1111,7 +1111,7 @@ namespace OpenSim.Region.Framework.Scenes
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
srcTaskItem.NextPermissions;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
srcTaskItem.NextPermissions;
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
destTaskItem.CurrentPermissions |= 8; // Slam!
}
}

View File

@ -675,7 +675,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity
d.Vector3 pos = d.BodyGetPosition(Body);
Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f);
// Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f);
Vector3 posChange = new Vector3();
posChange.X = pos.X - m_lastPositionVector.X;
posChange.Y = pos.Y - m_lastPositionVector.Y;

View File

@ -1576,19 +1576,19 @@ Console.WriteLine(" JointCreateFixed");
//Console.WriteLine("Move " + m_primName);
if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009
// NON-'VEHICLES' are dealt with here
if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
{
d.Vector3 avel2 = d.BodyGetAngularVel(Body);
/*
if (m_angularlock.X == 1)
avel2.X = 0;
if (m_angularlock.Y == 1)
avel2.Y = 0;
if (m_angularlock.Z == 1)
avel2.Z = 0;
d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z);
*/
}
// if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
// {
// d.Vector3 avel2 = d.BodyGetAngularVel(Body);
// /*
// if (m_angularlock.X == 1)
// avel2.X = 0;
// if (m_angularlock.Y == 1)
// avel2.Y = 0;
// if (m_angularlock.Z == 1)
// avel2.Z = 0;
// d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z);
// */
// }
//float PID_P = 900.0f;
float m_mass = CalculateMass();