diff options
author | UbitUmarov | 2018-12-28 14:40:51 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-28 14:40:51 +0000 |
commit | c14209e362a3994ecf078fbe251968e380c1bd47 (patch) | |
tree | f0faf6201ce0fe356b570ed9335aac22a3ce4a26 /OpenSim | |
parent | missing file (diff) | |
download | opensim-SC-c14209e362a3994ecf078fbe251968e380c1bd47.zip opensim-SC-c14209e362a3994ecf078fbe251968e380c1bd47.tar.gz opensim-SC-c14209e362a3994ecf078fbe251968e380c1bd47.tar.bz2 opensim-SC-c14209e362a3994ecf078fbe251968e380c1bd47.tar.xz |
add some LSL
Diffstat (limited to 'OpenSim')
3 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4d71cc8..c757cd0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4224,6 +4224,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4224 | } | 4224 | } |
4225 | } | 4225 | } |
4226 | 4226 | ||
4227 | public void llStartObjectAnimation(string anim) | ||
4228 | { | ||
4229 | m_host.AddScriptLPS(1); | ||
4230 | |||
4231 | // Do NOT try to parse UUID, animations cannot be triggered by ID | ||
4232 | UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); | ||
4233 | if (animID == UUID.Zero) | ||
4234 | return; | ||
4235 | m_host.AddAnimation(animID, anim); | ||
4236 | } | ||
4237 | |||
4238 | public void llStopObjectAnimation(string anim) | ||
4239 | { | ||
4240 | m_host.AddScriptLPS(1); | ||
4241 | UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); | ||
4242 | if (animID != UUID.Zero) | ||
4243 | m_host.RemoveAnimation(animID); | ||
4244 | } | ||
4245 | |||
4246 | public LSL_List llGetObjectAnimationNames() | ||
4247 | { | ||
4248 | m_host.AddScriptLPS(1); | ||
4249 | LSL_List ret = new LSL_List(); | ||
4250 | |||
4251 | if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0) | ||
4252 | return ret; | ||
4253 | |||
4254 | foreach (string name in m_host.AnimationsNames.Values) | ||
4255 | ret.Add(new LSL_String(name)); | ||
4256 | return ret; | ||
4257 | } | ||
4258 | |||
4227 | public void llPointAt(LSL_Vector pos) | 4259 | public void llPointAt(LSL_Vector pos) |
4228 | { | 4260 | { |
4229 | m_host.AddScriptLPS(1); | 4261 | m_host.AddScriptLPS(1); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 101e69d..8e1192c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -409,6 +409,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
409 | LSL_Float llSqrt(double f); | 409 | LSL_Float llSqrt(double f); |
410 | void llStartAnimation(string anim); | 410 | void llStartAnimation(string anim); |
411 | void llStopAnimation(string anim); | 411 | void llStopAnimation(string anim); |
412 | void llStartObjectAnimation(string anim); | ||
413 | void llStopObjectAnimation(string anim); | ||
414 | LSL_List llGetObjectAnimationNames(); | ||
412 | void llStopHover(); | 415 | void llStopHover(); |
413 | void llStopLookAt(); | 416 | void llStopLookAt(); |
414 | void llStopMoveToTarget(); | 417 | void llStopMoveToTarget(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 0704378..0f10d8d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -1836,6 +1836,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1836 | m_LSL_Functions.llStopAnimation(anim); | 1836 | m_LSL_Functions.llStopAnimation(anim); |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | public void llStartObjectAnimation(string anim) | ||
1840 | { | ||
1841 | m_LSL_Functions.llStartObjectAnimation(anim); | ||
1842 | } | ||
1843 | |||
1844 | public void llStopObjectAnimation(string anim) | ||
1845 | { | ||
1846 | m_LSL_Functions.llStopObjectAnimation(anim); | ||
1847 | } | ||
1848 | |||
1849 | public LSL_List llGetObjectAnimationNames() | ||
1850 | { | ||
1851 | return m_LSL_Functions.llGetObjectAnimationNames(); | ||
1852 | } | ||
1853 | |||
1839 | public void llStopHover() | 1854 | public void llStopHover() |
1840 | { | 1855 | { |
1841 | m_LSL_Functions.llStopHover(); | 1856 | m_LSL_Functions.llStopHover(); |