Minor tweak in ProcessEntityUpdates (mostly just confirming the git push is working)

slimupdates2
unknown 2010-05-12 16:05:48 -07:00
parent bf5c81d77e
commit 5d8638ed88
1 changed files with 4 additions and 5 deletions

View File

@ -3476,13 +3476,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>();
if (maxUpdates <= 0) maxUpdates = Int32.MaxValue;
int updatesThisCall = 0; int updatesThisCall = 0;
lock (m_entityUpdates.SyncRoot) lock (m_entityUpdates.SyncRoot)
{ {
EntityUpdate update; EntityUpdate update;
while (m_entityUpdates.TryDequeue(out update)) while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update))
{ {
++updatesThisCall;
#region UpdateFlags to packet type conversion #region UpdateFlags to packet type conversion
PrimUpdateFlags updateFlags = update.Flags; PrimUpdateFlags updateFlags = update.Flags;
@ -3552,10 +3555,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
#endregion Block Construction #endregion Block Construction
++updatesThisCall;
if (maxUpdates > 0 && updatesThisCall >= maxUpdates)
break;
} }
} }