aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs61
1 files changed, 36 insertions, 25 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c049cc8..691b7bb 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6008,18 +6008,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6008 6008
6009 zc.AddZeros(4); //update flags 6009 zc.AddZeros(4); //update flags
6010 6010
6011 //pbs 6011 //pbs volume data 23
6012 zc.AddByte(16); 6012 //texture entry 2
6013 zc.AddByte(1); 6013 //texture anim (1)
6014 //Utils.UInt16ToBytes(0, dest, pos); pos += 2; 6014 const int pbszeros = 23 + 2 + 1;
6015 //Utils.UInt16ToBytes(0, dest, pos); pos += 2;
6016 zc.AddZeros(4);
6017
6018 zc.AddByte(100);
6019 zc.AddByte(100);
6020
6021 // rest of pbs is 0 (15), texture entry (2) and texture anim (1)
6022 const int pbszeros = 15 + 2 + 1;
6023 zc.AddZeros(pbszeros); 6015 zc.AddZeros(pbszeros);
6024 6016
6025 //NameValue 6017 //NameValue
@@ -6154,15 +6146,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6154 6146
6155 #endregion PrimFlags 6147 #endregion PrimFlags
6156 6148
6157 if (part.Sound != UUID.Zero || part.SoundFlags != 0) 6149 bool hassound = part.Sound != UUID.Zero || part.SoundFlags != 0;
6150 if (hassound)
6158 { 6151 {
6159 update.Sound = part.Sound; 6152 update.Sound = part.Sound;
6160 update.OwnerID = part.OwnerID;
6161 update.Gain = (float)part.SoundGain; 6153 update.Gain = (float)part.SoundGain;
6162 update.Radius = (float)part.SoundRadius; 6154 update.Radius = (float)part.SoundRadius;
6163 update.Flags = part.SoundFlags; 6155 update.Flags = part.SoundFlags;
6164 } 6156 }
6165 6157
6158 if(hassound || update.PSBlock.Length > 1)
6159 update.OwnerID = part.OwnerID;
6160
6166 switch ((PCode)part.Shape.PCode) 6161 switch ((PCode)part.Shape.PCode)
6167 { 6162 {
6168 case PCode.Grass: 6163 case PCode.Grass:
@@ -6333,18 +6328,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6333 6328
6334 //text 6329 //text
6335 if (part.Text.Length == 0) 6330 if (part.Text.Length == 0)
6336 zc.AddZeros(1); 6331 zc.AddZeros(5);
6337 else 6332 else
6338 { 6333 {
6339 byte[] tbuf = Util.StringToBytes(part.Text, 255); 6334 byte[] tbuf = Util.StringToBytes(part.Text, 254);
6340 int len = tbuf.Length; 6335 int len = tbuf.Length;
6341 zc.AddByte((byte)len); 6336 zc.AddByte((byte)len);
6342 zc.AddBytes(tbuf, len); 6337 zc.AddBytes(tbuf, len);
6343 }
6344 6338
6345 //textcolor 6339 //textcolor
6346 byte[] tc = part.GetTextColor().GetBytes(false); 6340 byte[] tc = part.GetTextColor().GetBytes(false);
6347 zc.AddBytes(tc, 4); 6341 zc.AddBytes(tc, 4);
6342 }
6348 6343
6349 //media url 6344 //media url
6350 if (part.MediaUrl.Length == 0) 6345 if (part.MediaUrl.Length == 0)
@@ -6357,6 +6352,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6357 zc.AddBytes(tbuf, len); 6352 zc.AddBytes(tbuf, len);
6358 } 6353 }
6359 6354
6355 bool hasps = false;
6360 //particle system 6356 //particle system
6361 byte[] ps = part.ParticleSystem; 6357 byte[] ps = part.ParticleSystem;
6362 if (ps == null) 6358 if (ps == null)
@@ -6366,6 +6362,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6366 int len = ps.Length; 6362 int len = ps.Length;
6367 zc.AddByte((byte)len); 6363 zc.AddByte((byte)len);
6368 zc.AddBytes(ps, len); 6364 zc.AddBytes(ps, len);
6365 hasps = len > 1;
6369 } 6366 }
6370 6367
6371 //Extraparams 6368 //Extraparams
@@ -6379,11 +6376,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6379 zc.AddBytes(ep, len); 6376 zc.AddBytes(ep, len);
6380 } 6377 }
6381 6378
6382 zc.AddUUID(part.Sound); 6379 bool hassound = part.Sound != UUID.Zero || part.SoundFlags != 0;
6383 zc.AddUUID(part.OwnerID); 6380 if (hassound)
6384 zc.AddFloat((float)part.SoundGain); 6381 zc.AddUUID(part.Sound);
6385 zc.AddByte(part.SoundFlags); 6382 else
6386 zc.AddFloat((float)part.SoundRadius); 6383 zc.AddZeros(16);
6384
6385 if (hassound || hasps)
6386 zc.AddUUID(part.OwnerID);
6387 else
6388 zc.AddZeros(16);
6389
6390 if (hassound)
6391 {
6392 zc.AddFloat((float)part.SoundGain);
6393 zc.AddByte(part.SoundFlags);
6394 zc.AddFloat((float)part.SoundRadius);
6395 }
6396 else
6397 zc.AddZeros(9);
6387 6398
6388 // jointtype(1) joint pivot(12) joint offset(12) 6399 // jointtype(1) joint pivot(12) joint offset(12)
6389 const int lastzeros = 1 + 12 + 12; 6400 const int lastzeros = 1 + 12 + 12;