For llGetTexture(), if the face texture asset is in the inventory, return the inventory name rather than the asset UUID
This is as per http://wiki.secondlife.com/wiki/LlGetTexture Applied patch in http://opensimulator.org/mantis/view.php?id=4552 with an additional break statement if an inventory item is found to exit early. Thanks Michelle Argus!0.7.2-post-fixes
parent
5f281716a9
commit
a3316f1eac
|
@ -1912,11 +1912,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
face = 0;
|
||||
}
|
||||
|
||||
if (face >= 0 && face < GetNumberOfSides(part))
|
||||
{
|
||||
Primitive.TextureEntryFace texface;
|
||||
texface = tex.GetFace((uint)face);
|
||||
return texface.TextureID.ToString();
|
||||
string texture = texface.TextureID.ToString();
|
||||
|
||||
lock (part.TaskInventory)
|
||||
{
|
||||
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in part.TaskInventory)
|
||||
{
|
||||
if (inv.Value.AssetID == texface.TextureID)
|
||||
{
|
||||
texture = inv.Value.Name.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue