aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index d3ef88b..72d435f 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -764,6 +764,61 @@ namespace OpenSim.Region.ClientStack
764 #endregion 764 #endregion
765 765
766 #region unimplemented handlers 766 #region unimplemented handlers
767 case PacketType.AgentThrottle:
768
769 //OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
770
771 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
772
773 byte[] throttle = atpack.Throttle.Throttles;
774 int tResend = -1;
775 int tLand = -1;
776 int tWind = -1;
777 int tCloud = -1;
778 int tTask = -1;
779 int tTexture = -1;
780 int tAsset = -1;
781 int tall = -1;
782 int singlefloat = 4;
783
784 //Agent Throttle Block contains 6 single floatingpoint values.
785 int j = 0;
786
787 // Some Systems may be big endian...
788 // it might be smart to do this check more often...
789 if (!BitConverter.IsLittleEndian)
790 for (int i = 0; i < 7; i++)
791 Array.Reverse(throttle, j + i * singlefloat, singlefloat);
792
793 // values gotten from libsecondlife.org/wiki/Throttle. Thanks MW_
794 // bytes
795 // Convert to integer, since.. the full fp space isn't used.
796 tResend = (int)BitConverter.ToSingle(throttle, j);
797 j += singlefloat;
798 tLand = (int)BitConverter.ToSingle(throttle, j);
799 j += singlefloat;
800 tWind = (int)BitConverter.ToSingle(throttle, j);
801 j += singlefloat;
802 tCloud = (int)BitConverter.ToSingle(throttle, j);
803 j += singlefloat;
804 tTask = (int)BitConverter.ToSingle(throttle, j);
805 j += singlefloat;
806 tTexture = (int)BitConverter.ToSingle(throttle, j);
807 j += singlefloat;
808 tAsset = (int)BitConverter.ToSingle(throttle, j);
809
810 tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset;
811 OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet AgentThrottle - Got throttle:resendbytes=" + tResend +
812 " landbytes=" + tLand +
813 " windbytes=" + tWind +
814 " cloudbytes=" + tCloud +
815 " taskbytes=" + tTask +
816 " texturebytes=" + tTexture +
817 " Assetbytes=" + tAsset +
818 " Allbytes=" + tall);
819
820
821 break;
767 case PacketType.StartPingCheck: 822 case PacketType.StartPingCheck:
768 // Send the client the ping response back 823 // Send the client the ping response back
769 // Pass the same PingID in the matching packet 824 // Pass the same PingID in the matching packet