Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
commit
5108f4edf5
|
@ -70,6 +70,8 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate void StopAnim(IClientAPI remoteClient, UUID animID);
|
||||
|
||||
public delegate void ChangeAnim(UUID animID, bool addOrRemove, bool sendPack);
|
||||
|
||||
public delegate void LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
|
||||
|
||||
public delegate void DelinkObjects(List<uint> primIds, IClientAPI client);
|
||||
|
@ -791,6 +793,7 @@ namespace OpenSim.Framework
|
|||
event ObjectDrop OnObjectDrop;
|
||||
event StartAnim OnStartAnim;
|
||||
event StopAnim OnStopAnim;
|
||||
event ChangeAnim OnChangeAnim;
|
||||
event LinkObjects OnLinkObjects;
|
||||
event DelinkObjects OnDelinkObjects;
|
||||
event RequestMapBlocks OnRequestMapBlocks;
|
||||
|
|
|
@ -98,6 +98,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
public event AvatarPickerRequest OnAvatarPickerRequest;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event StopAnim OnStopAnim;
|
||||
public event ChangeAnim OnChangeAnim;
|
||||
public event Action<IClientAPI> OnRequestAvatarsData;
|
||||
public event LinkObjects OnLinkObjects;
|
||||
public event DelinkObjects OnDelinkObjects;
|
||||
|
@ -6386,7 +6387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/*
|
||||
StartAnim handlerStartAnim = null;
|
||||
StopAnim handlerStopAnim = null;
|
||||
|
||||
|
@ -6409,6 +6410,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
ChangeAnim handlerChangeAnim = null;
|
||||
|
||||
for (int i = 0; i < AgentAni.AnimationList.Length; i++)
|
||||
{
|
||||
handlerChangeAnim = OnChangeAnim;
|
||||
if (handlerChangeAnim != null)
|
||||
{
|
||||
handlerChangeAnim(AgentAni.AnimationList[i].AnimID, AgentAni.AnimationList[i].StartAnim, false);
|
||||
}
|
||||
}
|
||||
|
||||
handlerChangeAnim = OnChangeAnim;
|
||||
if (handlerChangeAnim != null)
|
||||
{
|
||||
handlerChangeAnim(UUID.Zero, false, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,13 +79,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
m_scenePresence = sp;
|
||||
CurrentMovementAnimation = "CROUCH";
|
||||
}
|
||||
|
||||
|
||||
public void AddAnimation(UUID animID, UUID objectID)
|
||||
{
|
||||
if (m_scenePresence.IsChildAgent)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name);
|
||||
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name);
|
||||
|
||||
if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
|
||||
SendAnimPack();
|
||||
|
@ -117,6 +117,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
|||
SendAnimPack();
|
||||
}
|
||||
|
||||
public void avnChangeAnim(UUID animID, bool addRemove, bool sendPack)
|
||||
{
|
||||
if (m_scenePresence.IsChildAgent)
|
||||
return;
|
||||
|
||||
if (animID != UUID.Zero)
|
||||
{
|
||||
if (addRemove)
|
||||
m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero);
|
||||
else
|
||||
m_animations.Remove(animID);
|
||||
}
|
||||
if(sendPack)
|
||||
SendAnimPack();
|
||||
}
|
||||
|
||||
// Called from scripts
|
||||
public void RemoveAnimation(string name)
|
||||
{
|
||||
|
|
|
@ -781,6 +781,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun;
|
||||
ControllingClient.OnStartAnim += HandleStartAnim;
|
||||
ControllingClient.OnStopAnim += HandleStopAnim;
|
||||
ControllingClient.OnChangeAnim += avnHandleChangeAnim;
|
||||
ControllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
||||
ControllingClient.OnAutoPilotGo += MoveToTarget;
|
||||
|
||||
|
@ -2432,6 +2433,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Animator.RemoveAnimation(animID);
|
||||
}
|
||||
|
||||
public void avnHandleChangeAnim(UUID animID, bool addRemove,bool sendPack)
|
||||
{
|
||||
Animator.avnChangeAnim(animID, addRemove, sendPack);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Rotate the avatar to the given rotation and apply a movement in the given relative vector
|
||||
/// </summary>
|
||||
|
|
|
@ -669,6 +669,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
public event ObjectDrop OnObjectDrop;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event StopAnim OnStopAnim;
|
||||
public event ChangeAnim OnChangeAnim;
|
||||
public event LinkObjects OnLinkObjects;
|
||||
public event DelinkObjects OnDelinkObjects;
|
||||
public event RequestMapBlocks OnRequestMapBlocks;
|
||||
|
|
|
@ -189,6 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
public event ObjectDrop OnObjectDrop;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event StopAnim OnStopAnim;
|
||||
public event ChangeAnim OnChangeAnim;
|
||||
public event LinkObjects OnLinkObjects;
|
||||
public event DelinkObjects OnDelinkObjects;
|
||||
public event RequestMapBlocks OnRequestMapBlocks;
|
||||
|
|
|
@ -6132,6 +6132,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
m_host.AddScriptLPS(1);
|
||||
return "en-us";
|
||||
}
|
||||
/// <summary>
|
||||
/// http://wiki.secondlife.com/wiki/LlGetAgentList
|
||||
/// The list of options is currently not used in SL
|
||||
/// scope is one of:-
|
||||
/// AGENT_LIST_REGION - all in the region
|
||||
/// AGENT_LIST_PARCEL - all in the same parcel as the scripted object
|
||||
/// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
|
||||
/// current parcel.
|
||||
/// </summary>
|
||||
public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// the constants are 1, 2 and 4 so bits are being set, but you
|
||||
// get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
|
||||
bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
|
||||
bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
|
||||
bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;
|
||||
|
||||
LSL_List result = new LSL_List();
|
||||
|
||||
if (!regionWide && !parcelOwned && !parcel)
|
||||
{
|
||||
result.Add("INVALID_SCOPE");
|
||||
return result;
|
||||
}
|
||||
|
||||
ILandObject land;
|
||||
Vector3 pos;
|
||||
UUID id = UUID.Zero;
|
||||
if (parcel || parcelOwned)
|
||||
{
|
||||
pos = m_host.ParentGroup.RootPart.GetWorldPosition();
|
||||
land = World.LandChannel.GetLandObject(pos.X, pos.Y);
|
||||
if (land == null)
|
||||
{
|
||||
id = UUID.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parcelOwned)
|
||||
{
|
||||
id = land.LandData.OwnerID;
|
||||
}
|
||||
else
|
||||
{
|
||||
id = land.LandData.GlobalID;
|
||||
}
|
||||
}
|
||||
}
|
||||
List<UUID> presenceIds = new List<UUID>();
|
||||
|
||||
World.ForEachRootScenePresence(
|
||||
delegate (ScenePresence ssp)
|
||||
{
|
||||
// Gods are not listed in SL
|
||||
if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
|
||||
{
|
||||
if (!regionWide)
|
||||
{
|
||||
pos = ssp.AbsolutePosition;
|
||||
land = World.LandChannel.GetLandObject(pos.X, pos.Y);
|
||||
if (land != null)
|
||||
{
|
||||
if (parcelOwned && land.LandData.OwnerID == id ||
|
||||
parcel && land.LandData.GlobalID == id)
|
||||
{
|
||||
result.Add(ssp.UUID.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add(ssp.UUID.ToString());
|
||||
}
|
||||
}
|
||||
// Maximum of 100 results
|
||||
if (result.Length > 99)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void llAdjustSoundVolume(double volume)
|
||||
{
|
||||
|
|
|
@ -108,6 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
LSL_Vector llGetAccel();
|
||||
LSL_Integer llGetAgentInfo(string id);
|
||||
LSL_String llGetAgentLanguage(string id);
|
||||
LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
|
||||
LSL_Vector llGetAgentSize(string id);
|
||||
LSL_Float llGetAlpha(int face);
|
||||
LSL_Float llGetAndResetTime();
|
||||
|
|
|
@ -500,6 +500,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
public const int OBJECT_STREAMING_COST = 15;
|
||||
public const int OBJECT_PHYSICS_COST = 16;
|
||||
|
||||
// for llGetAgentList
|
||||
public const int AGENT_LIST_PARCEL = 1;
|
||||
public const int AGENT_LIST_PARCEL_OWNER = 2;
|
||||
public const int AGENT_LIST_REGION = 4;
|
||||
|
||||
// Can not be public const?
|
||||
public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
|
||||
public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0);
|
||||
|
|
|
@ -391,6 +391,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_LSL_Functions.llGetAgentLanguage(id);
|
||||
}
|
||||
|
||||
public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
|
||||
{
|
||||
return m_LSL_Functions.llGetAgentList(scope, options);
|
||||
}
|
||||
|
||||
public LSL_Vector llGetAgentSize(string id)
|
||||
{
|
||||
return m_LSL_Functions.llGetAgentSize(id);
|
||||
|
|
|
@ -88,6 +88,7 @@ namespace OpenSim.Tests.Common.Mock
|
|||
public event ObjectDrop OnObjectDrop;
|
||||
public event StartAnim OnStartAnim;
|
||||
public event StopAnim OnStopAnim;
|
||||
public event ChangeAnim OnChangeAnim;
|
||||
public event LinkObjects OnLinkObjects;
|
||||
public event DelinkObjects OnDelinkObjects;
|
||||
public event RequestMapBlocks OnRequestMapBlocks;
|
||||
|
|
Loading…
Reference in New Issue