diff options
author | UbitUmarov | 2019-03-23 08:04:23 +0000 |
---|---|---|
committer | UbitUmarov | 2019-03-23 08:04:23 +0000 |
commit | 9c322c93ccb3d4560bc3c1082c15ff9e01d6dda3 (patch) | |
tree | dd4fed1bcbd7575b305919d60369b9ae807d2850 /OpenSim/Region/ClientStack | |
parent | make the text enable option visible for testing (diff) | |
download | opensim-SC-9c322c93ccb3d4560bc3c1082c15ff9e01d6dda3.zip opensim-SC-9c322c93ccb3d4560bc3c1082c15ff9e01d6dda3.tar.gz opensim-SC-9c322c93ccb3d4560bc3c1082c15ff9e01d6dda3.tar.bz2 opensim-SC-9c322c93ccb3d4560bc3c1082c15ff9e01d6dda3.tar.xz |
fix particles encoding on compressedupdate
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 9d606a6..2b288df 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -7145,7 +7145,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7145 | /// <summary>Whether the object has floating text ala llSetText</summary> | 7145 | /// <summary>Whether the object has floating text ala llSetText</summary> |
7146 | HasText = 0x04, | 7146 | HasText = 0x04, |
7147 | /// <summary>Whether the object has an active particle system</summary> | 7147 | /// <summary>Whether the object has an active particle system</summary> |
7148 | HasParticles = 0x08, | 7148 | HasParticlesLegacy = 0x08, |
7149 | /// <summary>Whether the object has sound attached to it</summary> | 7149 | /// <summary>Whether the object has sound attached to it</summary> |
7150 | HasSound = 0x10, | 7150 | HasSound = 0x10, |
7151 | /// <summary>Whether the object is attached to a root object or not</summary> | 7151 | /// <summary>Whether the object is attached to a root object or not</summary> |
@@ -7157,7 +7157,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7157 | /// <summary>Whether the object has a name value pairs string</summary> | 7157 | /// <summary>Whether the object has a name value pairs string</summary> |
7158 | HasNameValues = 0x100, | 7158 | HasNameValues = 0x100, |
7159 | /// <summary>Whether the object has a Media URL set</summary> | 7159 | /// <summary>Whether the object has a Media URL set</summary> |
7160 | MediaURL = 0x200 | 7160 | MediaURL = 0x200, |
7161 | HasParticlesNew = 0x400 | ||
7161 | } | 7162 | } |
7162 | 7163 | ||
7163 | ///**** temp hack | 7164 | ///**** temp hack |
@@ -7218,10 +7219,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7218 | bool hasangvel = part.AngularVelocity.LengthSquared() > 1e-8f; | 7219 | bool hasangvel = part.AngularVelocity.LengthSquared() > 1e-8f; |
7219 | bool hasmediaurl = part.MediaUrl != null && part.MediaUrl.Length > 1; | 7220 | bool hasmediaurl = part.MediaUrl != null && part.MediaUrl.Length > 1; |
7220 | 7221 | ||
7222 | bool haspsnew = false; | ||
7221 | if (hastext) | 7223 | if (hastext) |
7222 | cflags |= CompressedFlags.HasText; | 7224 | cflags |= CompressedFlags.HasText; |
7223 | if (hasps) | 7225 | if (hasps) |
7224 | cflags |= CompressedFlags.HasParticles; | 7226 | { |
7227 | if(part.ParticleSystem.Length > 86) | ||
7228 | { | ||
7229 | hasps= false; | ||
7230 | cflags |= CompressedFlags.HasParticlesNew; | ||
7231 | haspsnew = true; | ||
7232 | } | ||
7233 | else | ||
7234 | cflags |= CompressedFlags.HasParticlesLegacy; | ||
7235 | } | ||
7225 | if (hassound) | 7236 | if (hassound) |
7226 | cflags |= CompressedFlags.HasSound; | 7237 | cflags |= CompressedFlags.HasSound; |
7227 | if (part.ParentID != 0) | 7238 | if (part.ParentID != 0) |
@@ -7277,7 +7288,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7277 | 7288 | ||
7278 | Utils.UIntToBytesSafepos((uint)cflags, dest, pos); pos += 4; | 7289 | Utils.UIntToBytesSafepos((uint)cflags, dest, pos); pos += 4; |
7279 | 7290 | ||
7280 | if (hasps || hassound) | 7291 | if (hasps || haspsnew || hassound) |
7281 | part.OwnerID.ToBytes(dest, pos); | 7292 | part.OwnerID.ToBytes(dest, pos); |
7282 | else | 7293 | else |
7283 | UUID.Zero.ToBytes(dest, pos); | 7294 | UUID.Zero.ToBytes(dest, pos); |
@@ -7387,6 +7398,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7387 | pos += len; | 7398 | pos += len; |
7388 | } | 7399 | } |
7389 | } | 7400 | } |
7401 | |||
7402 | if (haspsnew) | ||
7403 | { | ||
7404 | byte[] ps = part.ParticleSystem; | ||
7405 | Buffer.BlockCopy(ps, 0, dest, pos, ps.Length); pos += ps.Length; | ||
7406 | } | ||
7407 | |||
7390 | int totlen = pos - lenpos - 2; | 7408 | int totlen = pos - lenpos - 2; |
7391 | dest[lenpos++] = (byte)totlen; | 7409 | dest[lenpos++] = (byte)totlen; |
7392 | dest[lenpos++] = (byte)(totlen >> 8); | 7410 | dest[lenpos++] = (byte)(totlen >> 8); |