dont send animation before object

0.9.1.0-post-fixes
UbitUmarov 2019-04-10 00:25:49 +01:00
parent b051b3a81d
commit b459b2c65f
1 changed files with 31 additions and 5 deletions

View File

@ -4967,15 +4967,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
continue; continue;
} }
if (m_SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) if (updateFlags == PrimUpdateFlags.Animations)
{ {
if (part.Animations != null) if (m_SupportObjectAnimations && part.Animations != null)
{ {
if (ObjectAnimationUpdates == null) if (ObjectAnimationUpdates == null)
ObjectAnimationUpdates = new List<SceneObjectPart>(); ObjectAnimationUpdates = new List<SceneObjectPart>();
ObjectAnimationUpdates.Add(part); ObjectAnimationUpdates.Add(part);
maxUpdatesBytes -= 20 * part.Animations.Count + 24; maxUpdatesBytes -= 20 * part.Animations.Count + 24;
} }
continue;
} }
if(viewerCache) if(viewerCache)
@ -5126,7 +5127,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (eu.Entity is ScenePresence) if (eu.Entity is ScenePresence)
CreateAvatarUpdateBlock((ScenePresence)eu.Entity, zc); CreateAvatarUpdateBlock((ScenePresence)eu.Entity, zc);
else else
CreatePrimUpdateBlock((SceneObjectPart)eu.Entity, mysp, zc); {
SceneObjectPart part = (SceneObjectPart)eu.Entity;
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);
}
if (zc.Position < LLUDPServer.MAXPAYLOAD - 200) if (zc.Position < LLUDPServer.MAXPAYLOAD - 200)
{ {
tau.Add(eu); tau.Add(eu);
@ -5273,6 +5287,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SceneObjectPart sop = (SceneObjectPart)eu.Entity; SceneObjectPart sop = (SceneObjectPart)eu.Entity;
if (sop.ParentGroup == null || sop.ParentGroup.IsDeleted) if (sop.ParentGroup == null || sop.ParentGroup.IsDeleted)
continue; continue;
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;
@ -6996,7 +7022,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddUInt(part.LocalId); zc.AddUInt(part.LocalId);
zc.AddByte(state); // state zc.AddByte(state); // state
zc.AddUUID(part.UUID); zc.AddUUID(part.UUID);
zc.AddZeros(4); // crc unused zc.AddUInt((uint)part.ParentGroup.PseudoCRC);
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
// material 1 // material 1
// clickaction 1 // clickaction 1
@ -7108,7 +7134,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
zc.AddUInt(part.LocalId); zc.AddUInt(part.LocalId);
zc.AddByte(state); // state zc.AddByte(state); // state
zc.AddUUID(part.UUID); zc.AddUUID(part.UUID);
zc.AddZeros(4); // crc unused zc.AddUInt((uint)part.ParentGroup.PseudoCRC);
zc.AddByte((byte)pcode); zc.AddByte((byte)pcode);
zc.AddByte(part.Material); zc.AddByte(part.Material);
zc.AddByte(part.ClickAction); // clickaction zc.AddByte(part.ClickAction); // clickaction