Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
2cced72d70
|
@ -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;");
|
||||
}
|
||||
|
|
|
@ -64,11 +64,19 @@ 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids)
|
||||
{
|
||||
if (kvp.Key != UUID.Zero)
|
||||
m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1303,18 +1303,31 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||
|
||||
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
|
||||
{
|
||||
lock (m_landList)
|
||||
{
|
||||
//Remove all the land objects in the sim and then process our new data
|
||||
foreach (int n in m_landList.Keys)
|
||||
{
|
||||
m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID);
|
||||
}
|
||||
m_landIDList.Initialize();
|
||||
m_landList.Clear();
|
||||
|
||||
for (int i = 0; i < data.Count; i++)
|
||||
{
|
||||
IncomingLandObjectFromStorage(data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void IncomingLandObjectFromStorage(LandData data)
|
||||
{
|
||||
|
||||
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
|
||||
new_land.LandData = data.Copy();
|
||||
new_land.SetLandBitmapFromByteArray();
|
||||
AddLandObject(new_land);
|
||||
new_land.SendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
|
||||
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
|
||||
|
|
|
@ -400,9 +400,9 @@ 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;
|
||||
itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions;
|
||||
|
||||
// If this is an object, replace current perms
|
||||
// with folded perms
|
||||
|
@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
// Ensure there is no escalation
|
||||
itemCopy.CurrentPermissions &= item.NextPermissions;
|
||||
itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move);
|
||||
|
||||
// Need slam bit on xfer
|
||||
itemCopy.CurrentPermissions |= 8;
|
||||
|
@ -916,14 +916,15 @@ 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 ;
|
||||
agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move));
|
||||
else
|
||||
agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
|
||||
|
||||
agentItem.CurrentPermissions |= 8;
|
||||
agentItem.NextPermissions = taskItem.NextPermissions;
|
||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
|
||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
|
||||
}
|
||||
else
|
||||
|
@ -1105,13 +1106,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (Permissions.PropagatePermissions())
|
||||
{
|
||||
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
|
||||
srcTaskItem.NextPermissions;
|
||||
(srcTaskItem.NextPermissions | (uint)PermissionMask.Move);
|
||||
destTaskItem.CurrentPermissions |= 8; // Slam!
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue