Thank you, Leaf, for a patch that implements llGetAnimationList()
XEngine implementation added by myself.
0.6.0-stable
Melanie Thielker 2008-08-15 21:18:08 +00:00
parent 72b8c1af1c
commit c1fa7592c7
3 changed files with 31 additions and 6 deletions

View File

@ -39,6 +39,7 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment.Types; using OpenSim.Region.Environment.Types;
using OpenSim.Region.Physics.Manager; using OpenSim.Region.Physics.Manager;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes
{ {
enum ScriptControlled : int enum ScriptControlled : int
@ -1346,6 +1347,14 @@ namespace OpenSim.Region.Environment.Scenes
RemoveAnimation(animID); RemoveAnimation(animID);
} }
public LLUUID[] GetAnimationArray()
{
LLUUID[] animIDs;
int[] sequenceNums;
m_animations.GetArrays( out animIDs, out sequenceNums );
return animIDs;
}
public void HandleStartAnim(IClientAPI remoteClient, LLUUID animID) public void HandleStartAnim(IClientAPI remoteClient, LLUUID animID)
{ {

View File

@ -5698,11 +5698,19 @@ namespace OpenSim.Region.ScriptEngine.Common
return (double)Math.Log(val); return (double)Math.Log(val);
} }
public LSL_Types.list llGetAnimationList(string id) public LSL_Types.list llGetAnimationList( string id )
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llGetAnimationList");
return new LSL_Types.list(); LSL_Types.list l = new LSL_Types.list();
ScenePresence av = World.GetScenePresence(id);
if( av == null )
return l;
LLUUID[] anims;
anims = av.GetAnimationArray();
foreach( LLUUID foo in anims )
l.Add( foo.ToString() );
return l;
} }
public void llSetParcelMusicURL(string url) public void llSetParcelMusicURL(string url)

View File

@ -5502,11 +5502,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return (double)Math.Log(val); return (double)Math.Log(val);
} }
public LSL_Types.list llGetAnimationList(string id) public LSL_Types.list llGetAnimationList( string id )
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llGetAnimationList");
return new LSL_Types.list(); LSL_Types.list l = new LSL_Types.list();
ScenePresence av = World.GetScenePresence(id);
if( av == null )
return l;
LLUUID[] anims;
anims = av.GetAnimationArray();
foreach( LLUUID foo in anims )
l.Add( foo.ToString() );
return l;
} }
public void llSetParcelMusicURL(string url) public void llSetParcelMusicURL(string url)