add vector osGetLinkColor(LSL_Integer linknum, LSL_Integer face)
This commit is contained in:
@@ -2068,7 +2068,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return GetColor(m_host, face);
|
||||
}
|
||||
|
||||
protected static LSL_Vector GetColor(SceneObjectPart part, int face)
|
||||
public LSL_Vector GetColor(SceneObjectPart part, int face)
|
||||
{
|
||||
Primitive.TextureEntry tex = part.Shape.Textures;
|
||||
Color4 texcolor;
|
||||
|
||||
@@ -6571,5 +6571,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
return ret.ToString();
|
||||
}
|
||||
|
||||
public LSL_Vector osGetLinkColor(LSL_Integer link, LSL_Integer face)
|
||||
{
|
||||
SceneObjectPart linkedPart = link.value switch
|
||||
{
|
||||
ScriptBaseClass.LINK_ROOT => m_host.ParentGroup.RootPart,
|
||||
ScriptBaseClass.LINK_THIS => m_host,
|
||||
_ => m_host.ParentGroup.GetLinkNumPart(link.value)
|
||||
};
|
||||
|
||||
if (linkedPart != null)
|
||||
{
|
||||
InitLSL();
|
||||
return m_LSL_Api.GetColor(linkedPart, face.value);
|
||||
}
|
||||
|
||||
return LSL_Vector.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -626,5 +626,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_String osAESEncryptTo(string secret, string plainText, string ivString);
|
||||
LSL_String osAESDecrypt(string secret, string encryptedText);
|
||||
LSL_String osAESDecryptFrom(string secret, string encryptedText, string ivString);
|
||||
vector osGetLinkColor(LSL_Integer linknum, LSL_Integer face);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1802,5 +1802,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osAESDecryptFrom(secret, encryptedText, ivString);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public vector osGetLinkColor(LSL_Integer link, LSL_Integer face)
|
||||
{
|
||||
return m_OSSL_Functions.osGetLinkColor(link, face);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user