diff options
author | Charles Krinke | 2008-05-30 15:34:54 +0000 |
---|---|---|
committer | Charles Krinke | 2008-05-30 15:34:54 +0000 |
commit | 48d0084e5344ffaa6478a35f88516a6d7a68e26c (patch) | |
tree | 8741e650eded05d20cb665e5bb3579c3ec01cc02 /OpenSim/Region/ClientStack | |
parent | * Read all files from tar archive (diff) | |
download | opensim-SC-48d0084e5344ffaa6478a35f88516a6d7a68e26c.zip opensim-SC-48d0084e5344ffaa6478a35f88516a6d7a68e26c.tar.gz opensim-SC-48d0084e5344ffaa6478a35f88516a6d7a68e26c.tar.bz2 opensim-SC-48d0084e5344ffaa6478a35f88516a6d7a68e26c.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 071a1bb..6a912e5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2229,11 +2229,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2229 | } | 2229 | } |
2230 | 2230 | ||
2231 | // Xantor 20080528: Send sound info as well | 2231 | // Xantor 20080528: Send sound info as well |
2232 | outPacket.ObjectData[0].Sound = SoundId; | 2232 | // Xantor 20080530: Zero out everything if there's no SoundId, so zerocompression will work again |
2233 | outPacket.ObjectData[0].OwnerID = ownerID; | 2233 | outPacket.ObjectData[0].Sound = SoundId; |
2234 | outPacket.ObjectData[0].Gain = (float) SoundGain; | 2234 | if (SoundId == LLUUID.Zero) |
2235 | outPacket.ObjectData[0].Radius = (float) SoundRadius; | 2235 | { |
2236 | outPacket.ObjectData[0].Flags = SoundFlags; | 2236 | outPacket.ObjectData[0].OwnerID = LLUUID.Zero; |
2237 | outPacket.ObjectData[0].Gain = 0.0f; | ||
2238 | outPacket.ObjectData[0].Radius = 0.0f; | ||
2239 | outPacket.ObjectData[0].Flags = 0; | ||
2240 | } | ||
2241 | else | ||
2242 | { | ||
2243 | outPacket.ObjectData[0].OwnerID = ownerID; | ||
2244 | outPacket.ObjectData[0].Gain = (float)SoundGain; | ||
2245 | outPacket.ObjectData[0].Radius = (float)SoundRadius; | ||
2246 | outPacket.ObjectData[0].Flags = SoundFlags; | ||
2247 | } | ||
2237 | 2248 | ||
2238 | byte[] pb = pos.GetBytes(); | 2249 | byte[] pb = pos.GetBytes(); |
2239 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); | 2250 | Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); |