mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLSimulationData.cs OpenSim/Data/MySQL/Resources/RegionStore.migrations OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
This commit is contained in:
@@ -960,21 +960,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
UUID avatarID = (UUID)avatar;
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// FIXME: What we really want to do here is factor out the similar code in llStopAnimation() to a common
|
||||
// method (though see that doesn't do the is animation check, which is probably a bug) and have both
|
||||
// these functions call that common code. However, this does mean navigating the brain-dead requirement
|
||||
// of calling InitLSL()
|
||||
if (World.Entities.ContainsKey(avatarID) && World.Entities[avatarID] is ScenePresence)
|
||||
{
|
||||
ScenePresence target = (ScenePresence)World.Entities[avatarID];
|
||||
if (target != null)
|
||||
{
|
||||
UUID animID = UUID.Zero;
|
||||
m_host.TaskInventory.LockItemsForRead(true);
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
|
||||
UUID animID;
|
||||
|
||||
if (!UUID.TryParse(animation, out animID))
|
||||
{
|
||||
if (inv.Value.Name == animation)
|
||||
{
|
||||
if (inv.Value.Type == (int)AssetType.Animation)
|
||||
animID = inv.Value.AssetID;
|
||||
continue;
|
||||
}
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(animation);
|
||||
if (item != null && item.Type == (int)AssetType.Animation)
|
||||
animID = item.AssetID;
|
||||
else
|
||||
animID = UUID.Zero;
|
||||
}
|
||||
m_host.TaskInventory.LockItemsForRead(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user