Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

TeleportWork
Justin Clark-Casey (justincc) 2013-07-23 23:32:24 +01:00
commit fa2653c8e1
5 changed files with 50 additions and 21 deletions

View File

@ -1402,17 +1402,16 @@ namespace OpenSim.Groups
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID);
string firstname, lastname;
if (account != null)
string firstname = "Unknown", lastname = "Unknown";
string name = m_UserManagement.GetUserName(dataForAgentID);
if (!string.IsNullOrEmpty(name))
{
firstname = account.FirstName;
lastname = account.LastName;
}
else
{
firstname = "Unknown";
lastname = "Unknown";
string[] parts = name.Split(new char[] { ' ' });
if (parts.Length >= 2)
{
firstname = parts[0];
lastname = parts[1];
}
}
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,

View File

@ -185,8 +185,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
}
public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel)
public void UploadInventoryItem(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
{
if (type == AssetType.Link)
return;
string userAssetServer = string.Empty;
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
{
@ -221,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{
UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data);
UploadInventoryItem(remoteClient.AgentId, newAssetID, "", 0);
UploadInventoryItem(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0);
return newAssetID;
}
@ -232,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
protected override void ExportAsset(UUID agentID, UUID assetID)
{
if (!assetID.Equals(UUID.Zero))
UploadInventoryItem(agentID, assetID, "", 0);
UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0);
else
m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
}
@ -348,7 +351,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
InventoryFolderBase root = m_Scene.InventoryService.GetRootFolder(client.AgentId);
InventoryCollection content = m_Scene.InventoryService.GetFolderContent(client.AgentId, root.ID);
inv.SendBulkUpdateInventory(content.Folders.ToArray(), content.Items.ToArray());
List<InventoryFolderBase> keep = new List<InventoryFolderBase>();
foreach (InventoryFolderBase f in content.Folders)
{
if (f.Name != "My Suitcase" && f.Name != "Current Outfit")
keep.Add(f);
}
inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray());
}
}
}
@ -381,7 +392,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
foreach (InventoryFolderBase f in content.Folders)
{
if (f.Name != "My Suitcase")
if (f.Name != "My Suitcase" && f.Name != "Current Outfit")
{
f.Name = f.Name + " (Unavailable)";
keep.Add(f);

View File

@ -742,7 +742,7 @@ namespace OpenSim.Region.Framework.Scenes
public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel);
public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel)
public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
{
NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
if (handlerNewInventoryItemUpdateComplete != null)
@ -2155,7 +2155,7 @@ namespace OpenSim.Region.Framework.Scenes
{
try
{
d(agentID, AssetID, AssetName, userlevel);
d(agentID, type, AssetID, AssetName, userlevel);
}
catch (Exception e)
{

View File

@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
{
userlevel = 1;
}
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel);
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
return true;
}
@ -178,7 +178,7 @@ namespace OpenSim.Region.Framework.Scenes
{
userlevel = 1;
}
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel);
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
if (originalFolder != UUID.Zero)
{

View File

@ -1125,6 +1125,25 @@ namespace OpenSim.Region.Framework.Scenes
public void StopFlying()
{
Vector3 pos = AbsolutePosition;
if (Appearance.AvatarHeight != 127.0f)
pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f));
else
pos += new Vector3(0f, 0f, (1.56f / 6f));
AbsolutePosition = pos;
// attach a suitable collision plane regardless of the actual situation to force the LLClient to land.
// Collision plane below the avatar's position a 6th of the avatar's height is suitable.
// Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a
// certain amount.. because the LLClient wouldn't land in that situation anyway.
// why are we still testing for this really old height value default???
if (Appearance.AvatarHeight != 127.0f)
CollisionPlane = new Vector4(0, 0, 0, pos.Z - Appearance.AvatarHeight / 6f);
else
CollisionPlane = new Vector4(0, 0, 0, pos.Z - (1.56f / 6f));
ControllingClient.SendAgentTerseUpdate(this);
}