diff options
Diffstat (limited to 'OpenSim')
5 files changed, 50 insertions, 21 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 82e2d6f..69d03a9 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -1402,19 +1402,18 @@ namespace OpenSim.Groups | |||
1402 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1402 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
1403 | 1403 | ||
1404 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff | 1404 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff |
1405 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID); | 1405 | string firstname = "Unknown", lastname = "Unknown"; |
1406 | string firstname, lastname; | 1406 | string name = m_UserManagement.GetUserName(dataForAgentID); |
1407 | if (account != null) | 1407 | if (!string.IsNullOrEmpty(name)) |
1408 | { | ||
1409 | firstname = account.FirstName; | ||
1410 | lastname = account.LastName; | ||
1411 | } | ||
1412 | else | ||
1413 | { | 1408 | { |
1414 | firstname = "Unknown"; | 1409 | string[] parts = name.Split(new char[] { ' ' }); |
1415 | lastname = "Unknown"; | 1410 | if (parts.Length >= 2) |
1411 | { | ||
1412 | firstname = parts[0]; | ||
1413 | lastname = parts[1]; | ||
1414 | } | ||
1416 | } | 1415 | } |
1417 | 1416 | ||
1418 | remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname, | 1417 | remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname, |
1419 | lastname, activeGroupPowers, activeGroupName, | 1418 | lastname, activeGroupPowers, activeGroupName, |
1420 | activeGroupTitle); | 1419 | activeGroupTitle); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index e0c8ea6..8f9800f 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -185,8 +185,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) | 188 | public void UploadInventoryItem(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel) |
189 | { | 189 | { |
190 | if (type == AssetType.Link) | ||
191 | return; | ||
192 | |||
190 | string userAssetServer = string.Empty; | 193 | string userAssetServer = string.Empty; |
191 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) | 194 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) |
192 | { | 195 | { |
@@ -221,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
221 | { | 224 | { |
222 | UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); | 225 | UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); |
223 | 226 | ||
224 | UploadInventoryItem(remoteClient.AgentId, newAssetID, "", 0); | 227 | UploadInventoryItem(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0); |
225 | 228 | ||
226 | return newAssetID; | 229 | return newAssetID; |
227 | } | 230 | } |
@@ -232,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
232 | protected override void ExportAsset(UUID agentID, UUID assetID) | 235 | protected override void ExportAsset(UUID agentID, UUID assetID) |
233 | { | 236 | { |
234 | if (!assetID.Equals(UUID.Zero)) | 237 | if (!assetID.Equals(UUID.Zero)) |
235 | UploadInventoryItem(agentID, assetID, "", 0); | 238 | UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0); |
236 | else | 239 | else |
237 | m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); | 240 | m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); |
238 | } | 241 | } |
@@ -348,7 +351,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
348 | InventoryFolderBase root = m_Scene.InventoryService.GetRootFolder(client.AgentId); | 351 | InventoryFolderBase root = m_Scene.InventoryService.GetRootFolder(client.AgentId); |
349 | InventoryCollection content = m_Scene.InventoryService.GetFolderContent(client.AgentId, root.ID); | 352 | InventoryCollection content = m_Scene.InventoryService.GetFolderContent(client.AgentId, root.ID); |
350 | 353 | ||
351 | inv.SendBulkUpdateInventory(content.Folders.ToArray(), content.Items.ToArray()); | 354 | List<InventoryFolderBase> keep = new List<InventoryFolderBase>(); |
355 | |||
356 | foreach (InventoryFolderBase f in content.Folders) | ||
357 | { | ||
358 | if (f.Name != "My Suitcase" && f.Name != "Current Outfit") | ||
359 | keep.Add(f); | ||
360 | } | ||
361 | |||
362 | inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray()); | ||
352 | } | 363 | } |
353 | } | 364 | } |
354 | } | 365 | } |
@@ -381,7 +392,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
381 | 392 | ||
382 | foreach (InventoryFolderBase f in content.Folders) | 393 | foreach (InventoryFolderBase f in content.Folders) |
383 | { | 394 | { |
384 | if (f.Name != "My Suitcase") | 395 | if (f.Name != "My Suitcase" && f.Name != "Current Outfit") |
385 | { | 396 | { |
386 | f.Name = f.Name + " (Unavailable)"; | 397 | f.Name = f.Name + " (Unavailable)"; |
387 | keep.Add(f); | 398 | keep.Add(f); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 61b0ebd..39d7512 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -742,7 +742,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
742 | public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; | 742 | public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; |
743 | public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); | 743 | public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); |
744 | 744 | ||
745 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); | 745 | public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel); |
746 | 746 | ||
747 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; | 747 | public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; |
748 | 748 | ||
@@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2146 | } | 2146 | } |
2147 | } | 2147 | } |
2148 | 2148 | ||
2149 | public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) | 2149 | public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel) |
2150 | { | 2150 | { |
2151 | NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; | 2151 | NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; |
2152 | if (handlerNewInventoryItemUpdateComplete != null) | 2152 | if (handlerNewInventoryItemUpdateComplete != null) |
@@ -2155,7 +2155,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2155 | { | 2155 | { |
2156 | try | 2156 | try |
2157 | { | 2157 | { |
2158 | d(agentID, AssetID, AssetName, userlevel); | 2158 | d(agentID, type, AssetID, AssetName, userlevel); |
2159 | } | 2159 | } |
2160 | catch (Exception e) | 2160 | catch (Exception e) |
2161 | { | 2161 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 1e4d558..58fa18c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
139 | { | 139 | { |
140 | userlevel = 1; | 140 | userlevel = 1; |
141 | } | 141 | } |
142 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel); | 142 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); |
143 | 143 | ||
144 | return true; | 144 | return true; |
145 | } | 145 | } |
@@ -178,7 +178,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
178 | { | 178 | { |
179 | userlevel = 1; | 179 | userlevel = 1; |
180 | } | 180 | } |
181 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel); | 181 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); |
182 | 182 | ||
183 | if (originalFolder != UUID.Zero) | 183 | if (originalFolder != UUID.Zero) |
184 | { | 184 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 33db88b..6433878 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1125,6 +1125,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1125 | 1125 | ||
1126 | public void StopFlying() | 1126 | public void StopFlying() |
1127 | { | 1127 | { |
1128 | Vector3 pos = AbsolutePosition; | ||
1129 | if (Appearance.AvatarHeight != 127.0f) | ||
1130 | pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); | ||
1131 | else | ||
1132 | pos += new Vector3(0f, 0f, (1.56f / 6f)); | ||
1133 | |||
1134 | AbsolutePosition = pos; | ||
1135 | |||
1136 | // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. | ||
1137 | // Collision plane below the avatar's position a 6th of the avatar's height is suitable. | ||
1138 | // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a | ||
1139 | // certain amount.. because the LLClient wouldn't land in that situation anyway. | ||
1140 | |||
1141 | // why are we still testing for this really old height value default??? | ||
1142 | if (Appearance.AvatarHeight != 127.0f) | ||
1143 | CollisionPlane = new Vector4(0, 0, 0, pos.Z - Appearance.AvatarHeight / 6f); | ||
1144 | else | ||
1145 | CollisionPlane = new Vector4(0, 0, 0, pos.Z - (1.56f / 6f)); | ||
1146 | |||
1128 | ControllingClient.SendAgentTerseUpdate(this); | 1147 | ControllingClient.SendAgentTerseUpdate(this); |
1129 | } | 1148 | } |
1130 | 1149 | ||