Mantis#1422. Thank you kindly, Xantor for a patch that :

- volume doesn't change with a new llLoopSound(same sound, new volume);
- SendFullUpdateToClients sends 0's in all sound related fields when 
there's no sound on the prim, thereby improving the amount of data being 
sent out on these prims (fixes zeropack)
- Removed some code duplication between llStartSound, llLoopSound and llParticleSystem() calls
This commit is contained in:
Charles Krinke
2008-05-30 15:34:54 +00:00
parent f26eeab3d4
commit 48d0084e53
2 changed files with 48 additions and 49 deletions

View File

@@ -2229,11 +2229,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
// Xantor 20080528: Send sound info as well
outPacket.ObjectData[0].Sound = SoundId;
outPacket.ObjectData[0].OwnerID = ownerID;
outPacket.ObjectData[0].Gain = (float) SoundGain;
outPacket.ObjectData[0].Radius = (float) SoundRadius;
outPacket.ObjectData[0].Flags = SoundFlags;
// Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again
outPacket.ObjectData[0].Sound = SoundId;
if (SoundId == LLUUID.Zero)
{
outPacket.ObjectData[0].OwnerID = LLUUID.Zero;
outPacket.ObjectData[0].Gain = 0.0f;
outPacket.ObjectData[0].Radius = 0.0f;
outPacket.ObjectData[0].Flags = 0;
}
else
{
outPacket.ObjectData[0].OwnerID = ownerID;
outPacket.ObjectData[0].Gain = (float)SoundGain;
outPacket.ObjectData[0].Radius = (float)SoundRadius;
outPacket.ObjectData[0].Flags = SoundFlags;
}
byte[] pb = pos.GetBytes();
Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);