mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user