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 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 LinkObjects(IClientAPI remoteClient, uint parent, List<uint> children);
|
||||||
|
|
||||||
public delegate void DelinkObjects(List<uint> primIds, IClientAPI client);
|
public delegate void DelinkObjects(List<uint> primIds, IClientAPI client);
|
||||||
|
@ -791,6 +793,7 @@ namespace OpenSim.Framework
|
||||||
event ObjectDrop OnObjectDrop;
|
event ObjectDrop OnObjectDrop;
|
||||||
event StartAnim OnStartAnim;
|
event StartAnim OnStartAnim;
|
||||||
event StopAnim OnStopAnim;
|
event StopAnim OnStopAnim;
|
||||||
|
event ChangeAnim OnChangeAnim;
|
||||||
event LinkObjects OnLinkObjects;
|
event LinkObjects OnLinkObjects;
|
||||||
event DelinkObjects OnDelinkObjects;
|
event DelinkObjects OnDelinkObjects;
|
||||||
event RequestMapBlocks OnRequestMapBlocks;
|
event RequestMapBlocks OnRequestMapBlocks;
|
||||||
|
|
|
@ -98,6 +98,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public event AvatarPickerRequest OnAvatarPickerRequest;
|
public event AvatarPickerRequest OnAvatarPickerRequest;
|
||||||
public event StartAnim OnStartAnim;
|
public event StartAnim OnStartAnim;
|
||||||
public event StopAnim OnStopAnim;
|
public event StopAnim OnStopAnim;
|
||||||
|
public event ChangeAnim OnChangeAnim;
|
||||||
public event Action<IClientAPI> OnRequestAvatarsData;
|
public event Action<IClientAPI> OnRequestAvatarsData;
|
||||||
public event LinkObjects OnLinkObjects;
|
public event LinkObjects OnLinkObjects;
|
||||||
public event DelinkObjects OnDelinkObjects;
|
public event DelinkObjects OnDelinkObjects;
|
||||||
|
@ -6386,7 +6387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
/*
|
||||||
StartAnim handlerStartAnim = null;
|
StartAnim handlerStartAnim = null;
|
||||||
StopAnim handlerStopAnim = 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
SendAnimPack();
|
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
|
// Called from scripts
|
||||||
public void RemoveAnimation(string name)
|
public void RemoveAnimation(string name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -781,6 +781,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun;
|
ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun;
|
||||||
ControllingClient.OnStartAnim += HandleStartAnim;
|
ControllingClient.OnStartAnim += HandleStartAnim;
|
||||||
ControllingClient.OnStopAnim += HandleStopAnim;
|
ControllingClient.OnStopAnim += HandleStopAnim;
|
||||||
|
ControllingClient.OnChangeAnim += avnHandleChangeAnim;
|
||||||
ControllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
ControllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
||||||
ControllingClient.OnAutoPilotGo += MoveToTarget;
|
ControllingClient.OnAutoPilotGo += MoveToTarget;
|
||||||
|
|
||||||
|
@ -2432,6 +2433,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Animator.RemoveAnimation(animID);
|
Animator.RemoveAnimation(animID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void avnHandleChangeAnim(UUID animID, bool addRemove,bool sendPack)
|
||||||
|
{
|
||||||
|
Animator.avnChangeAnim(animID, addRemove, sendPack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rotate the avatar to the given rotation and apply a movement in the given relative vector
|
/// Rotate the avatar to the given rotation and apply a movement in the given relative vector
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -669,6 +669,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
public event ObjectDrop OnObjectDrop;
|
public event ObjectDrop OnObjectDrop;
|
||||||
public event StartAnim OnStartAnim;
|
public event StartAnim OnStartAnim;
|
||||||
public event StopAnim OnStopAnim;
|
public event StopAnim OnStopAnim;
|
||||||
|
public event ChangeAnim OnChangeAnim;
|
||||||
public event LinkObjects OnLinkObjects;
|
public event LinkObjects OnLinkObjects;
|
||||||
public event DelinkObjects OnDelinkObjects;
|
public event DelinkObjects OnDelinkObjects;
|
||||||
public event RequestMapBlocks OnRequestMapBlocks;
|
public event RequestMapBlocks OnRequestMapBlocks;
|
||||||
|
|
|
@ -189,6 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
public event ObjectDrop OnObjectDrop;
|
public event ObjectDrop OnObjectDrop;
|
||||||
public event StartAnim OnStartAnim;
|
public event StartAnim OnStartAnim;
|
||||||
public event StopAnim OnStopAnim;
|
public event StopAnim OnStopAnim;
|
||||||
|
public event ChangeAnim OnChangeAnim;
|
||||||
public event LinkObjects OnLinkObjects;
|
public event LinkObjects OnLinkObjects;
|
||||||
public event DelinkObjects OnDelinkObjects;
|
public event DelinkObjects OnDelinkObjects;
|
||||||
public event RequestMapBlocks OnRequestMapBlocks;
|
public event RequestMapBlocks OnRequestMapBlocks;
|
||||||
|
|
|
@ -6132,6 +6132,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
return "en-us";
|
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)
|
public void llAdjustSoundVolume(double volume)
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,6 +108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_Vector llGetAccel();
|
LSL_Vector llGetAccel();
|
||||||
LSL_Integer llGetAgentInfo(string id);
|
LSL_Integer llGetAgentInfo(string id);
|
||||||
LSL_String llGetAgentLanguage(string id);
|
LSL_String llGetAgentLanguage(string id);
|
||||||
|
LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
|
||||||
LSL_Vector llGetAgentSize(string id);
|
LSL_Vector llGetAgentSize(string id);
|
||||||
LSL_Float llGetAlpha(int face);
|
LSL_Float llGetAlpha(int face);
|
||||||
LSL_Float llGetAndResetTime();
|
LSL_Float llGetAndResetTime();
|
||||||
|
|
|
@ -500,6 +500,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int OBJECT_STREAMING_COST = 15;
|
public const int OBJECT_STREAMING_COST = 15;
|
||||||
public const int OBJECT_PHYSICS_COST = 16;
|
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?
|
// Can not be public const?
|
||||||
public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
|
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);
|
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);
|
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)
|
public LSL_Vector llGetAgentSize(string id)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llGetAgentSize(id);
|
return m_LSL_Functions.llGetAgentSize(id);
|
||||||
|
|
|
@ -88,6 +88,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
public event ObjectDrop OnObjectDrop;
|
public event ObjectDrop OnObjectDrop;
|
||||||
public event StartAnim OnStartAnim;
|
public event StartAnim OnStartAnim;
|
||||||
public event StopAnim OnStopAnim;
|
public event StopAnim OnStopAnim;
|
||||||
|
public event ChangeAnim OnChangeAnim;
|
||||||
public event LinkObjects OnLinkObjects;
|
public event LinkObjects OnLinkObjects;
|
||||||
public event DelinkObjects OnDelinkObjects;
|
public event DelinkObjects OnDelinkObjects;
|
||||||
public event RequestMapBlocks OnRequestMapBlocks;
|
public event RequestMapBlocks OnRequestMapBlocks;
|
||||||
|
|
Loading…
Reference in New Issue