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!remove-scene-viewer
parent
34026887fe
commit
8a6e6866d9
|
@ -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