aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-05-28 14:03:08 +0000
committerCharles Krinke2008-05-28 14:03:08 +0000
commit06147d0492e91c06a7d8f3a19c20897033f560a3 (patch)
tree5010f60eafa04b6907c5edc5d2233b06584d4c8e /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parentMantis#1398. Thank you kindly, cmickeyb for a patch that: (diff)
downloadopensim-SC_OLD-06147d0492e91c06a7d8f3a19c20897033f560a3.zip
opensim-SC_OLD-06147d0492e91c06a7d8f3a19c20897033f560a3.tar.gz
opensim-SC_OLD-06147d0492e91c06a7d8f3a19c20897033f560a3.tar.bz2
opensim-SC_OLD-06147d0492e91c06a7d8f3a19c20897033f560a3.tar.xz
Mantis#1406. Thank you kindly, Xantor for a patch that:
llLoopSound sends out one packet to clients in view, so it doesn't work anymore when clients enter later on, or the prim is modified in any way. Solution: Stored sound data on prim, send full update instead. llStartSound and llLoopSound now accept both LLUUIDs to a sound as well as object inventory sound names. llStopSound clears prim data and sends full update.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs18
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 853d550..440392a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2194,7 +2194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2194 SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel, 2194 SendPrimitiveToClient(regionHandle, timeDilation, localID, primShape, pos, vel,
2195 acc, rotation, rvel, flags, 2195 acc, rotation, rvel, flags,
2196 objectID, ownerID, text, color, parentID, particleSystem, 2196 objectID, ownerID, text, color, parentID, particleSystem,
2197 clickAction, textureanim, false,(uint)0, LLUUID.Zero); 2197 clickAction, textureanim, false,(uint)0, LLUUID.Zero, LLUUID.Zero,0,0,0);
2198 } 2198 }
2199 2199
2200 public void SendPrimitiveToClient( 2200 public void SendPrimitiveToClient(
@@ -2202,12 +2202,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2202 LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity, 2202 LLVector3 pos, LLVector3 velocity, LLVector3 acceleration, LLQuaternion rotation, LLVector3 rotational_velocity,
2203 uint flags, 2203 uint flags,
2204 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, 2204 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
2205 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId) 2205 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId, LLUUID SoundId, double SoundGain, byte SoundFlags, double SoundRadius)
2206 { 2206 {
2207 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2207 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2208 rotation = LLQuaternion.Identity; 2208 rotation = LLQuaternion.Identity;
2209 2209
2210 ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); 2210 ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
2211
2212
2213
2211 // TODO: don't create new blocks if recycling an old packet 2214 // TODO: don't create new blocks if recycling an old packet
2212 outPacket.RegionData.RegionHandle = regionHandle; 2215 outPacket.RegionData.RegionHandle = regionHandle;
2213 outPacket.RegionData.TimeDilation = timeDilation; 2216 outPacket.RegionData.TimeDilation = timeDilation;
@@ -2234,7 +2237,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2234 outPacket.ObjectData[0].ParentID = parentID; 2237 outPacket.ObjectData[0].ParentID = parentID;
2235 outPacket.ObjectData[0].PSBlock = particleSystem; 2238 outPacket.ObjectData[0].PSBlock = particleSystem;
2236 outPacket.ObjectData[0].ClickAction = clickAction; 2239 outPacket.ObjectData[0].ClickAction = clickAction;
2237 //outPacket.ObjectData[0].Flags = 0; 2240 outPacket.ObjectData[0].Flags = 0;
2238 2241
2239 if (attachment) 2242 if (attachment)
2240 { 2243 {
@@ -2248,8 +2251,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2248 outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16)); 2251 outPacket.ObjectData[0].State = (byte)((AttachPoint % 16) * 16 + (AttachPoint / 16));
2249 } 2252 }
2250 2253
2251 // Sound Radius 2254 // Xantor 20080528: Send sound info as well
2252 outPacket.ObjectData[0].Radius = 20; 2255 outPacket.ObjectData[0].Sound = SoundId;
2256 outPacket.ObjectData[0].OwnerID = ownerID;
2257 outPacket.ObjectData[0].Gain = (float) SoundGain;
2258 outPacket.ObjectData[0].Radius = (float) SoundRadius;
2259 outPacket.ObjectData[0].Flags = SoundFlags;
2260
2253 2261
2254 byte[] pb = pos.GetBytes(); 2262 byte[] pb = pos.GetBytes();
2255 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 2263 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);