diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 151 |
1 files changed, 82 insertions, 69 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index fa72410..105501f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -37,6 +37,7 @@ using System.Xml; | |||
37 | using log4net; | 37 | using log4net; |
38 | using OpenMetaverse; | 38 | using OpenMetaverse; |
39 | using OpenMetaverse.Packets; | 39 | using OpenMetaverse.Packets; |
40 | using OpenMetaverse.Messages.Linden; | ||
40 | using OpenMetaverse.StructuredData; | 41 | using OpenMetaverse.StructuredData; |
41 | using OpenSim.Framework; | 42 | using OpenSim.Framework; |
42 | using OpenSim.Framework.Client; | 43 | using OpenSim.Framework.Client; |
@@ -328,7 +329,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
328 | /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an | 329 | /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an |
329 | /// ownerless phantom. | 330 | /// ownerless phantom. |
330 | /// | 331 | /// |
331 | /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock | 332 | /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock |
332 | /// | 333 | /// |
333 | /// </value> | 334 | /// </value> |
334 | protected HashSet<uint> m_killRecord; | 335 | protected HashSet<uint> m_killRecord; |
@@ -394,18 +395,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
394 | public string ActiveGroupName { get { return m_activeGroupName; } } | 395 | public string ActiveGroupName { get { return m_activeGroupName; } } |
395 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } | 396 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } |
396 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } | 397 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } |
398 | |||
397 | /// <summary> | 399 | /// <summary> |
398 | /// First name of the agent/avatar represented by the client | 400 | /// First name of the agent/avatar represented by the client |
399 | /// </summary> | 401 | /// </summary> |
400 | public string FirstName { get { return m_firstName; } } | 402 | public string FirstName { get { return m_firstName; } } |
403 | |||
401 | /// <summary> | 404 | /// <summary> |
402 | /// Last name of the agent/avatar represented by the client | 405 | /// Last name of the agent/avatar represented by the client |
403 | /// </summary> | 406 | /// </summary> |
404 | public string LastName { get { return m_lastName; } } | 407 | public string LastName { get { return m_lastName; } } |
408 | |||
405 | /// <summary> | 409 | /// <summary> |
406 | /// Full name of the client (first name and last name) | 410 | /// Full name of the client (first name and last name) |
407 | /// </summary> | 411 | /// </summary> |
408 | public string Name { get { return FirstName + " " + LastName; } } | 412 | public string Name { get { return FirstName + " " + LastName; } } |
413 | |||
409 | public uint CircuitCode { get { return m_circuitCode; } } | 414 | public uint CircuitCode { get { return m_circuitCode; } } |
410 | public int MoneyBalance { get { return m_moneyBalance; } } | 415 | public int MoneyBalance { get { return m_moneyBalance; } } |
411 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } | 416 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } |
@@ -742,7 +747,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
742 | handshake.RegionInfo3.CPURatio = 1; | 747 | handshake.RegionInfo3.CPURatio = 1; |
743 | 748 | ||
744 | handshake.RegionInfo3.ColoName = Utils.EmptyBytes; | 749 | handshake.RegionInfo3.ColoName = Utils.EmptyBytes; |
745 | handshake.RegionInfo3.ProductName = Utils.EmptyBytes; | 750 | handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); |
746 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; | 751 | handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; |
747 | 752 | ||
748 | OutPacket(handshake, ThrottleOutPacketType.Task); | 753 | OutPacket(handshake, ThrottleOutPacketType.Task); |
@@ -2743,7 +2748,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2743 | DirPlacesReplyPacket.StatusDataBlock[] status = | 2748 | DirPlacesReplyPacket.StatusDataBlock[] status = |
2744 | new DirPlacesReplyPacket.StatusDataBlock[0]; | 2749 | new DirPlacesReplyPacket.StatusDataBlock[0]; |
2745 | 2750 | ||
2746 | int i = 0; | 2751 | packet.QueryReplies = replies; |
2752 | packet.StatusData = status; | ||
2753 | |||
2747 | foreach (DirPlacesReplyData d in data) | 2754 | foreach (DirPlacesReplyData d in data) |
2748 | { | 2755 | { |
2749 | int idx = replies.Length; | 2756 | int idx = replies.Length; |
@@ -2779,11 +2786,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2779 | 2786 | ||
2780 | replies = new DirPlacesReplyPacket.QueryRepliesBlock[0]; | 2787 | replies = new DirPlacesReplyPacket.QueryRepliesBlock[0]; |
2781 | status = new DirPlacesReplyPacket.StatusDataBlock[0]; | 2788 | status = new DirPlacesReplyPacket.StatusDataBlock[0]; |
2782 | |||
2783 | } | 2789 | } |
2784 | } | 2790 | } |
2785 | 2791 | ||
2786 | if (replies.Length > 0) | 2792 | if (replies.Length > 0 || data.Length == 0) |
2787 | OutPacket(packet, ThrottleOutPacketType.Task); | 2793 | OutPacket(packet, ThrottleOutPacketType.Task); |
2788 | } | 2794 | } |
2789 | 2795 | ||
@@ -4143,7 +4149,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4143 | rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; | 4149 | rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; |
4144 | rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; | 4150 | rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; |
4145 | rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue; | 4151 | rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue; |
4146 | rinfopack.RegionInfo2.ProductName = Utils.EmptyBytes; | 4152 | rinfopack.RegionInfo2.ProductName = Util.StringToBytes256(args.regionType); |
4147 | rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes; | 4153 | rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes; |
4148 | 4154 | ||
4149 | rinfopack.HasVariableBlocks = true; | 4155 | rinfopack.HasVariableBlocks = true; |
@@ -4215,94 +4221,101 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4215 | 4221 | ||
4216 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | 4222 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) |
4217 | { | 4223 | { |
4218 | ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ParcelProperties); | 4224 | ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); |
4219 | // TODO: don't create new blocks if recycling an old packet | ||
4220 | 4225 | ||
4221 | updatePacket.ParcelData.AABBMax = landData.AABBMax; | 4226 | updateMessage.AABBMax = landData.AABBMax; |
4222 | updatePacket.ParcelData.AABBMin = landData.AABBMin; | 4227 | updateMessage.AABBMin = landData.AABBMin; |
4223 | updatePacket.ParcelData.Area = landData.Area; | 4228 | updateMessage.Area = landData.Area; |
4224 | updatePacket.ParcelData.AuctionID = landData.AuctionID; | 4229 | updateMessage.AuctionID = landData.AuctionID; |
4225 | updatePacket.ParcelData.AuthBuyerID = landData.AuthBuyerID; | 4230 | updateMessage.AuthBuyerID = landData.AuthBuyerID; |
4226 | 4231 | ||
4227 | updatePacket.ParcelData.Bitmap = landData.Bitmap; | 4232 | updateMessage.Bitmap = landData.Bitmap; |
4228 | 4233 | ||
4229 | updatePacket.ParcelData.Desc = Utils.StringToBytes(landData.Description); | 4234 | updateMessage.Desc = landData.Description; |
4230 | updatePacket.ParcelData.Category = (byte)landData.Category; | 4235 | updateMessage.Category = landData.Category; |
4231 | updatePacket.ParcelData.ClaimDate = landData.ClaimDate; | 4236 | updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); |
4232 | updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; | 4237 | updateMessage.ClaimPrice = landData.ClaimPrice; |
4233 | updatePacket.ParcelData.GroupID = landData.GroupID; | 4238 | updateMessage.GroupID = landData.GroupID; |
4234 | updatePacket.ParcelData.GroupPrims = landData.GroupPrims; | 4239 | updateMessage.GroupPrims = landData.GroupPrims; |
4235 | updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned; | 4240 | updateMessage.IsGroupOwned = landData.IsGroupOwned; |
4236 | updatePacket.ParcelData.LandingType = landData.LandingType; | 4241 | updateMessage.LandingType = (LandingType) landData.LandingType; |
4237 | updatePacket.ParcelData.LocalID = landData.LocalID; | 4242 | updateMessage.LocalID = landData.LocalID; |
4238 | 4243 | ||
4239 | if (landData.Area > 0) | 4244 | if (landData.Area > 0) |
4240 | { | 4245 | { |
4241 | updatePacket.ParcelData.MaxPrims = parcelObjectCapacity; | 4246 | updateMessage.MaxPrims = parcelObjectCapacity; |
4242 | } | 4247 | } |
4243 | else | 4248 | else |
4244 | { | 4249 | { |
4245 | updatePacket.ParcelData.MaxPrims = 0; | 4250 | updateMessage.MaxPrims = 0; |
4246 | } | 4251 | } |
4247 | 4252 | ||
4248 | updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; | 4253 | updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale); |
4249 | updatePacket.ParcelData.MediaID = landData.MediaID; | 4254 | updateMessage.MediaID = landData.MediaID; |
4250 | updatePacket.ParcelData.MediaURL = Util.StringToBytes256(landData.MediaURL); | 4255 | updateMessage.MediaURL = landData.MediaURL; |
4251 | updatePacket.ParcelData.MusicURL = Util.StringToBytes256(landData.MusicURL); | 4256 | updateMessage.MusicURL = landData.MusicURL; |
4252 | updatePacket.ParcelData.Name = Util.StringToBytes256(landData.Name); | 4257 | updateMessage.Name = landData.Name; |
4253 | updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime; | 4258 | updateMessage.OtherCleanTime = landData.OtherCleanTime; |
4254 | updatePacket.ParcelData.OtherCount = 0; //TODO: Unimplemented | 4259 | updateMessage.OtherCount = 0; //TODO: Unimplemented |
4255 | updatePacket.ParcelData.OtherPrims = landData.OtherPrims; | 4260 | updateMessage.OtherPrims = landData.OtherPrims; |
4256 | updatePacket.ParcelData.OwnerID = landData.OwnerID; | 4261 | updateMessage.OwnerID = landData.OwnerID; |
4257 | updatePacket.ParcelData.OwnerPrims = landData.OwnerPrims; | 4262 | updateMessage.OwnerPrims = landData.OwnerPrims; |
4258 | updatePacket.ParcelData.ParcelFlags = landData.Flags; | 4263 | updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; |
4259 | updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor; | 4264 | updateMessage.ParcelPrimBonus = simObjectBonusFactor; |
4260 | updatePacket.ParcelData.PassHours = landData.PassHours; | 4265 | updateMessage.PassHours = landData.PassHours; |
4261 | updatePacket.ParcelData.PassPrice = landData.PassPrice; | 4266 | updateMessage.PassPrice = landData.PassPrice; |
4262 | updatePacket.ParcelData.PublicCount = 0; //TODO: Unimplemented | 4267 | updateMessage.PublicCount = 0; //TODO: Unimplemented |
4263 | 4268 | ||
4264 | updatePacket.ParcelData.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; | 4269 | updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; |
4265 | updatePacket.ParcelData.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0; | 4270 | updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; |
4266 | updatePacket.ParcelData.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0; | 4271 | |
4267 | updatePacket.ParcelData.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; | 4272 | //updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0; |
4268 | 4273 | //updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0; | |
4269 | updatePacket.ParcelData.RentPrice = 0; | 4274 | |
4270 | updatePacket.ParcelData.RequestResult = request_result; | 4275 | updateMessage.RentPrice = 0; |
4271 | updatePacket.ParcelData.SalePrice = landData.SalePrice; | 4276 | updateMessage.RequestResult = (ParcelResult) request_result; |
4272 | updatePacket.ParcelData.SelectedPrims = landData.SelectedPrims; | 4277 | updateMessage.SalePrice = landData.SalePrice; |
4273 | updatePacket.ParcelData.SelfCount = 0; //TODO: Unimplemented | 4278 | updateMessage.SelectedPrims = landData.SelectedPrims; |
4274 | updatePacket.ParcelData.SequenceID = sequence_id; | 4279 | updateMessage.SelfCount = 0; //TODO: Unimplemented |
4280 | updateMessage.SequenceID = sequence_id; | ||
4275 | if (landData.SimwideArea > 0) | 4281 | if (landData.SimwideArea > 0) |
4276 | { | 4282 | { |
4277 | updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity; | 4283 | updateMessage.SimWideMaxPrims = parcelObjectCapacity; |
4278 | } | 4284 | } |
4279 | else | 4285 | else |
4280 | { | 4286 | { |
4281 | updatePacket.ParcelData.SimWideMaxPrims = 0; | 4287 | updateMessage.SimWideMaxPrims = 0; |
4282 | } | 4288 | } |
4283 | updatePacket.ParcelData.SimWideTotalPrims = landData.SimwidePrims; | 4289 | updateMessage.SimWideTotalPrims = landData.SimwidePrims; |
4284 | updatePacket.ParcelData.SnapSelection = snap_selection; | 4290 | updateMessage.SnapSelection = snap_selection; |
4285 | updatePacket.ParcelData.SnapshotID = landData.SnapshotID; | 4291 | updateMessage.SnapshotID = landData.SnapshotID; |
4286 | updatePacket.ParcelData.Status = (byte)landData.Status; | 4292 | updateMessage.Status = (ParcelStatus) landData.Status; |
4287 | updatePacket.ParcelData.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + | 4293 | updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + |
4288 | landData.SelectedPrims; | 4294 | landData.SelectedPrims; |
4289 | updatePacket.ParcelData.UserLocation = landData.UserLocation; | 4295 | updateMessage.UserLocation = landData.UserLocation; |
4290 | updatePacket.ParcelData.UserLookAt = landData.UserLookAt; | 4296 | updateMessage.UserLookAt = landData.UserLookAt; |
4291 | updatePacket.Header.Zerocoded = true; | 4297 | |
4298 | updateMessage.MediaType = landData.MediaType; | ||
4299 | updateMessage.MediaDesc = landData.MediaDescription; | ||
4300 | updateMessage.MediaWidth = landData.MediaWidth; | ||
4301 | updateMessage.MediaHeight = landData.MediaHeight; | ||
4302 | updateMessage.MediaLoop = landData.MediaLoop; | ||
4303 | updateMessage.ObscureMusic = landData.ObscureMusic; | ||
4304 | updateMessage.ObscureMedia = landData.ObscureMedia; | ||
4292 | 4305 | ||
4293 | try | 4306 | try |
4294 | { | 4307 | { |
4295 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | 4308 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); |
4296 | if (eq != null) | 4309 | if (eq != null) |
4297 | { | 4310 | { |
4298 | eq.ParcelProperties(updatePacket, this.AgentId); | 4311 | eq.ParcelProperties(updateMessage, this.AgentId); |
4299 | } | 4312 | } else { |
4313 | m_log.Warn("No EQ Interface when sending parcel data."); | ||
4314 | } | ||
4300 | } | 4315 | } |
4301 | catch (Exception ex) | 4316 | catch (Exception ex) |
4302 | { | 4317 | { |
4303 | m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString()); | 4318 | m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString()); |
4304 | m_log.Warn("sending parcel data via UDP"); | ||
4305 | OutPacket(updatePacket, ThrottleOutPacketType.Task); | ||
4306 | } | 4319 | } |
4307 | } | 4320 | } |
4308 | 4321 | ||
@@ -8995,7 +9008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8995 | if (handlerGodKickUser != null) | 9008 | if (handlerGodKickUser != null) |
8996 | { | 9009 | { |
8997 | handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, | 9010 | handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, |
8998 | gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); | 9011 | gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason); |
8999 | } | 9012 | } |
9000 | } | 9013 | } |
9001 | else | 9014 | else |