add LSL_Integer osClearObjectAnimations() to remove all animations on a prim, returning the number it had; some clean on sending
parent
6684c35bb0
commit
248d56d3ad
|
@ -5170,16 +5170,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
SceneObjectPart part = (SceneObjectPart)eu.Entity;
|
SceneObjectPart part = (SceneObjectPart)eu.Entity;
|
||||||
shouldCreateSelected = part.CreateSelected;
|
shouldCreateSelected = part.CreateSelected;
|
||||||
if (eu.Flags.HasFlag(PrimUpdateFlags.Animations))
|
|
||||||
{
|
|
||||||
if (m_SupportObjectAnimations && part.Animations != null)
|
|
||||||
{
|
|
||||||
if (ObjectAnimationUpdates == null)
|
|
||||||
ObjectAnimationUpdates = new List<SceneObjectPart>();
|
|
||||||
ObjectAnimationUpdates.Add(part);
|
|
||||||
}
|
|
||||||
eu.Flags &= ~PrimUpdateFlags.Animations;
|
|
||||||
}
|
|
||||||
CreatePrimUpdateBlock(part, mysp, zc);
|
CreatePrimUpdateBlock(part, mysp, zc);
|
||||||
}
|
}
|
||||||
if (zc.Position < LLUDPServer.MAXPAYLOAD - 300)
|
if (zc.Position < LLUDPServer.MAXPAYLOAD - 300)
|
||||||
|
@ -5336,17 +5326,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
shouldCreateSelected = sop.CreateSelected;
|
shouldCreateSelected = sop.CreateSelected;
|
||||||
|
|
||||||
if (eu.Flags.HasFlag(PrimUpdateFlags.Animations))
|
|
||||||
{
|
|
||||||
if (m_SupportObjectAnimations && sop.Animations != null)
|
|
||||||
{
|
|
||||||
if (ObjectAnimationUpdates == null)
|
|
||||||
ObjectAnimationUpdates = new List<SceneObjectPart>();
|
|
||||||
ObjectAnimationUpdates.Add(sop);
|
|
||||||
}
|
|
||||||
eu.Flags &= ~PrimUpdateFlags.Animations;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastpos = zc.Position;
|
lastpos = zc.Position;
|
||||||
lastzc = zc.ZeroCount;
|
lastzc = zc.ZeroCount;
|
||||||
|
|
||||||
|
|
|
@ -5688,6 +5688,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int ClearObjectAnimations()
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
if(Animations != null)
|
||||||
|
{
|
||||||
|
ret = Animations.Count;
|
||||||
|
Animations.Clear();
|
||||||
|
AnimationsNames.Clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Animations = new Dictionary<UUID, int>();
|
||||||
|
AnimationsNames = new Dictionary<UUID, string>();
|
||||||
|
}
|
||||||
|
ScheduleUpdate(PrimUpdateFlags.Animations);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
public int GetAnimations(out UUID[] ids, out int[] seqs)
|
public int GetAnimations(out UUID[] ids, out int[] seqs)
|
||||||
{
|
{
|
||||||
ids = null;
|
ids = null;
|
||||||
|
|
|
@ -5774,5 +5774,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return Vector3.Zero;
|
return Vector3.Zero;
|
||||||
return target.StandOffset;
|
return target.StandOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osClearObjectAnimations()
|
||||||
|
{
|
||||||
|
return m_host.ClearObjectAnimations();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -568,5 +568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osSetLinkStandTarget(LSL_Integer linkNumber, vector v);
|
void osSetLinkStandTarget(LSL_Integer linkNumber, vector v);
|
||||||
vector osGetStandTarget();
|
vector osGetStandTarget();
|
||||||
vector osGetLinkStandTarget(LSL_Integer linkNumber);
|
vector osGetLinkStandTarget(LSL_Integer linkNumber);
|
||||||
|
LSL_Integer osClearObjectAnimations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public partial class ScriptBaseClass
|
public partial class ScriptBaseClass
|
||||||
{
|
{
|
||||||
// SCRIPTS CONSTANTS
|
// SCRIPTS CONSTANTS
|
||||||
public static readonly LSLInteger OS_APIVERSION = 11;
|
public static readonly LSLInteger OS_APIVERSION = 12;
|
||||||
|
|
||||||
public static readonly LSLInteger TRUE = 1;
|
public static readonly LSLInteger TRUE = 1;
|
||||||
public static readonly LSLInteger FALSE = 0;
|
public static readonly LSLInteger FALSE = 0;
|
||||||
|
|
|
@ -1461,5 +1461,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osGetLinkStandTarget(linkNumber);
|
return m_OSSL_Functions.osGetLinkStandTarget(linkNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osClearObjectAnimations()
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osClearObjectAnimations();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue