aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 9a26f4b..8291105 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1912,11 +1912,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1912 { 1912 {
1913 face = 0; 1913 face = 0;
1914 } 1914 }
1915
1915 if (face >= 0 && face < GetNumberOfSides(part)) 1916 if (face >= 0 && face < GetNumberOfSides(part))
1916 { 1917 {
1917 Primitive.TextureEntryFace texface; 1918 Primitive.TextureEntryFace texface;
1918 texface = tex.GetFace((uint)face); 1919 texface = tex.GetFace((uint)face);
1919 return texface.TextureID.ToString(); 1920 string texture = texface.TextureID.ToString();
1921
1922 lock (part.TaskInventory)
1923 {
1924 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in part.TaskInventory)
1925 {
1926 if (inv.Value.AssetID == texface.TextureID)
1927 {
1928 texture = inv.Value.Name.ToString();
1929 break;
1930 }
1931 }
1932 }
1933
1934 return texture;
1920 } 1935 }
1921 else 1936 else
1922 { 1937 {