diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 1 |
8 files changed, 115 insertions, 5 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 451984c..06a8bab 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -203,6 +203,8 @@ namespace OpenSim.Framework | |||
203 | 203 | ||
204 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); | 204 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); |
205 | 205 | ||
206 | public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient,LLUUID AgentID, uint RequestFlags, LLUUID TaskID); | ||
207 | |||
206 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); | 208 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); |
207 | 209 | ||
208 | public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); | 210 | public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); |
@@ -320,6 +322,7 @@ namespace OpenSim.Framework | |||
320 | event ObjectDeselect OnObjectDeselect; | 322 | event ObjectDeselect OnObjectDeselect; |
321 | event GenericCall7 OnObjectDescription; | 323 | event GenericCall7 OnObjectDescription; |
322 | event GenericCall7 OnObjectName; | 324 | event GenericCall7 OnObjectName; |
325 | event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | ||
323 | event UpdatePrimFlags OnUpdatePrimFlags; | 326 | event UpdatePrimFlags OnUpdatePrimFlags; |
324 | event UpdatePrimTexture OnUpdatePrimTexture; | 327 | event UpdatePrimTexture OnUpdatePrimTexture; |
325 | event UpdateVector OnUpdatePrimGroupPosition; | 328 | event UpdateVector OnUpdatePrimGroupPosition; |
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 77c1701..f0ebf03 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -71,6 +71,7 @@ namespace OpenSim.Region.ClientStack | |||
71 | public event ObjectDeselect OnObjectDeselect; | 71 | public event ObjectDeselect OnObjectDeselect; |
72 | public event GenericCall7 OnObjectDescription; | 72 | public event GenericCall7 OnObjectDescription; |
73 | public event GenericCall7 OnObjectName; | 73 | public event GenericCall7 OnObjectName; |
74 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | ||
74 | public event UpdatePrimFlags OnUpdatePrimFlags; | 75 | public event UpdatePrimFlags OnUpdatePrimFlags; |
75 | public event UpdatePrimTexture OnUpdatePrimTexture; | 76 | public event UpdatePrimTexture OnUpdatePrimTexture; |
76 | public event UpdateVector OnUpdatePrimGroupPosition; | 77 | public event UpdateVector OnUpdatePrimGroupPosition; |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index da4f830..d3ef88b 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -395,6 +395,22 @@ namespace OpenSim.Region.ClientStack | |||
395 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); | 395 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); |
396 | break; | 396 | break; |
397 | 397 | ||
398 | case PacketType.RequestObjectPropertiesFamily: | ||
399 | //This powers the little tooltip that appears when you move your mouse over an object | ||
400 | RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; | ||
401 | |||
402 | |||
403 | RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; | ||
404 | |||
405 | if (OnRequestObjectPropertiesFamily != null) | ||
406 | { | ||
407 | OnRequestObjectPropertiesFamily(this, this.m_agentId, packObjBlock.RequestFlags, packObjBlock.ObjectID); | ||
408 | |||
409 | |||
410 | } | ||
411 | |||
412 | break; | ||
413 | |||
398 | #endregion | 414 | #endregion |
399 | 415 | ||
400 | #region Inventory/Asset/Other related packets | 416 | #region Inventory/Asset/Other related packets |
@@ -725,6 +741,7 @@ namespace OpenSim.Region.ClientStack | |||
725 | } | 741 | } |
726 | break; | 742 | break; |
727 | case PacketType.ParcelObjectOwnersRequest: | 743 | case PacketType.ParcelObjectOwnersRequest: |
744 | //System.Console.WriteLine(Pack.ToString()); | ||
728 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket) Pack; | 745 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket) Pack; |
729 | if (OnParcelObjectOwnerRequest != null) | 746 | if (OnParcelObjectOwnerRequest != null) |
730 | { | 747 | { |
@@ -747,7 +764,18 @@ namespace OpenSim.Region.ClientStack | |||
747 | #endregion | 764 | #endregion |
748 | 765 | ||
749 | #region unimplemented handlers | 766 | #region unimplemented handlers |
767 | case PacketType.StartPingCheck: | ||
768 | // Send the client the ping response back | ||
769 | // Pass the same PingID in the matching packet | ||
770 | // Handled In the packet processing | ||
771 | OpenSim.Framework.Console.MainLog.Instance.Debug("CLIENT", "possibly unhandled packet " + Pack.ToString()); | ||
772 | break; | ||
773 | case PacketType.CompletePingCheck: | ||
774 | // Parhaps this should be processed on the Sim to determine whether or not to drop a dead client | ||
775 | // Dumping it to the verbose console until it's handled properly. | ||
750 | 776 | ||
777 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); | ||
778 | break; | ||
751 | case PacketType.AgentIsNowWearing: | 779 | case PacketType.AgentIsNowWearing: |
752 | // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; | 780 | // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; |
753 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); | 781 | OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString()); |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index c436b89..1625e80 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -354,6 +354,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | } | 354 | } |
355 | 355 | ||
356 | /// <summary> | 356 | /// <summary> |
357 | /// This handles the nifty little tool tip that you get when you drag your mouse over an object | ||
358 | /// Send to the Object Group to process. We don't know enough to service the request | ||
359 | /// </summary> | ||
360 | /// <param name="remoteClient"></param> | ||
361 | /// <param name="AgentID"></param> | ||
362 | /// <param name="RequestFlags"></param> | ||
363 | /// <param name="ObjectID"></param> | ||
364 | public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID) | ||
365 | { | ||
366 | SceneObjectGroup group = GetGroupByPrim(ObjectID); | ||
367 | if (group != null) | ||
368 | group.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); | ||
369 | |||
370 | |||
371 | } | ||
372 | |||
373 | /// <summary> | ||
357 | /// | 374 | /// |
358 | /// </summary> | 375 | /// </summary> |
359 | /// <param name="localID"></param> | 376 | /// <param name="localID"></param> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d7e36c5..0f1642f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
708 | client.OnDelinkObjects += m_innerScene.DelinkObjects; | 708 | client.OnDelinkObjects += m_innerScene.DelinkObjects; |
709 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; | 709 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; |
710 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; | 710 | client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags; |
711 | 711 | client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily; | |
712 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest); | 712 | client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest); |
713 | client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest); | 713 | client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest); |
714 | client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest); | 714 | client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index c9b6e9f..38e1609 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -462,6 +462,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
462 | dupe.AbsolutePosition = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 462 | dupe.AbsolutePosition = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
463 | dupe.m_scene = m_scene; | 463 | dupe.m_scene = m_scene; |
464 | dupe.m_regionHandle = m_regionHandle; | 464 | dupe.m_regionHandle = m_regionHandle; |
465 | |||
465 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID); | 466 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID); |
466 | 467 | ||
467 | 468 | ||
@@ -519,6 +520,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
519 | SetPartAsRoot(newPart); | 520 | SetPartAsRoot(newPart); |
520 | } | 521 | } |
521 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) { | 522 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) { |
523 | part.LastOwnerID = part.OwnerID; | ||
522 | part.OwnerID = cAgentID; | 524 | part.OwnerID = cAgentID; |
523 | part.GroupID = cGroupID; | 525 | part.GroupID = cGroupID; |
524 | part.ScheduleFullUpdate(); | 526 | part.ScheduleFullUpdate(); |
@@ -535,6 +537,38 @@ namespace OpenSim.Region.Environment.Scenes | |||
535 | m_parts.Add(newPart.UUID, newPart); | 537 | m_parts.Add(newPart.UUID, newPart); |
536 | SetPartAsNonRoot(newPart); | 538 | SetPartAsNonRoot(newPart); |
537 | } | 539 | } |
540 | |||
541 | /// <summary> | ||
542 | /// | ||
543 | /// </summary> | ||
544 | /// <param name="part"></param> | ||
545 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient,LLUUID AgentID, uint RequestFlags) | ||
546 | { | ||
547 | //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); | ||
548 | ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket(); | ||
549 | ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); | ||
550 | objPropDB.RequestFlags = RequestFlags; | ||
551 | objPropDB.ObjectID = RootPart.UUID; | ||
552 | objPropDB.OwnerID = RootPart.ObjectOwner; | ||
553 | objPropDB.GroupID = RootPart.GroupID; | ||
554 | objPropDB.BaseMask = RootPart.BaseMask; | ||
555 | objPropDB.OwnerMask = RootPart.OwnerMask; | ||
556 | objPropDB.GroupMask = RootPart.GroupMask; | ||
557 | objPropDB.EveryoneMask = RootPart.EveryoneMask; | ||
558 | objPropDB.NextOwnerMask = RootPart.NextOwnerMask; | ||
559 | |||
560 | // TODO: More properties are needed in SceneObjectPart! | ||
561 | objPropDB.OwnershipCost = RootPart.OwnershipCost; | ||
562 | objPropDB.SaleType = RootPart.ObjectSaleType; | ||
563 | objPropDB.SalePrice = RootPart.SalePrice; | ||
564 | objPropDB.Category = RootPart.Category; | ||
565 | objPropDB.LastOwnerID = RootPart.CreatorID; | ||
566 | objPropDB.Name = Helpers.StringToField(RootPart.Name); | ||
567 | objPropDB.Description = Helpers.StringToField(RootPart.Description); | ||
568 | objPropFamilyPack.ObjectData = objPropDB; | ||
569 | remoteClient.OutPacket(objPropFamilyPack); | ||
570 | |||
571 | } | ||
538 | public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) | 572 | public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) |
539 | { | 573 | { |
540 | part.OwnerID = cAgentID; | 574 | part.OwnerID = cAgentID; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 70b8829..727ebb0 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -51,13 +51,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
51 | [XmlIgnore] public PhysicsActor PhysActor = null; | 51 | [XmlIgnore] public PhysicsActor PhysActor = null; |
52 | 52 | ||
53 | protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>(); | 53 | protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>(); |
54 | 54 | public LLUUID LastOwnerID; | |
55 | public LLUUID OwnerID; | 55 | public LLUUID OwnerID; |
56 | public LLUUID GroupID; | 56 | public LLUUID GroupID; |
57 | public LLUUID LastOwnerID; | 57 | public int OwnershipCost; |
58 | public byte ObjectSaleType; | ||
59 | public int SalePrice; | ||
60 | public uint Category; | ||
61 | |||
58 | public Int32 CreationDate; | 62 | public Int32 CreationDate; |
59 | public uint ParentID = 0; | 63 | public uint ParentID = 0; |
60 | 64 | ||
65 | |||
61 | public uint OwnerMask = FULL_MASK_PERMISSIONS; | 66 | public uint OwnerMask = FULL_MASK_PERMISSIONS; |
62 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS; | 67 | public uint NextOwnerMask = FULL_MASK_PERMISSIONS; |
63 | public uint GroupMask = FULL_MASK_PERMISSIONS; | 68 | public uint GroupMask = FULL_MASK_PERMISSIONS; |
@@ -68,6 +73,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
68 | 73 | ||
69 | [XmlIgnore] public uint TimeStampFull = 0; | 74 | [XmlIgnore] public uint TimeStampFull = 0; |
70 | [XmlIgnore] public uint TimeStampTerse = 0; | 75 | [XmlIgnore] public uint TimeStampTerse = 0; |
76 | [XmlIgnore] public uint TimeStampLastActivity = 0; // Will be used for AutoReturn | ||
71 | 77 | ||
72 | protected SceneObjectGroup m_parentGroup; | 78 | protected SceneObjectGroup m_parentGroup; |
73 | 79 | ||
@@ -418,7 +424,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
418 | UUID = LLUUID.Random(); | 424 | UUID = LLUUID.Random(); |
419 | LocalID = (uint) (localID); | 425 | LocalID = (uint) (localID); |
420 | Shape = shape; | 426 | Shape = shape; |
421 | 427 | // Todo: Add More Object Parameter from above! | |
428 | OwnershipCost = 0; | ||
429 | ObjectSaleType = (byte)0; | ||
430 | SalePrice = 0; | ||
431 | Category = (uint)0; | ||
432 | LastOwnerID = CreatorID; | ||
433 | // End Todo: /// | ||
422 | GroupPosition = groupPosition; | 434 | GroupPosition = groupPosition; |
423 | OffsetPosition = offsetPosition; | 435 | OffsetPosition = offsetPosition; |
424 | RotationOffset = rotationOffset; | 436 | RotationOffset = rotationOffset; |
@@ -467,8 +479,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
467 | LastOwnerID = lastOwnerID; | 479 | LastOwnerID = lastOwnerID; |
468 | UUID = LLUUID.Random(); | 480 | UUID = LLUUID.Random(); |
469 | LocalID = (uint) (localID); | 481 | LocalID = (uint) (localID); |
482 | // Todo: Add More parameters from above | ||
470 | Shape = shape; | 483 | Shape = shape; |
471 | 484 | OwnershipCost = 0; | |
485 | ObjectSaleType = (byte)0; | ||
486 | SalePrice = 0; | ||
487 | Category = (uint)0; | ||
488 | // End Todo: /// | ||
489 | LastOwnerID = CreatorID; | ||
472 | OffsetPosition = position; | 490 | OffsetPosition = position; |
473 | RotationOffset = rotation; | 491 | RotationOffset = rotation; |
474 | ObjectFlags = flags; | 492 | ObjectFlags = flags; |
@@ -538,6 +556,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
538 | dupe.AngularVelocity = new LLVector3(0, 0, 0); | 556 | dupe.AngularVelocity = new LLVector3(0, 0, 0); |
539 | dupe.ObjectFlags = ObjectFlags; | 557 | dupe.ObjectFlags = ObjectFlags; |
540 | 558 | ||
559 | dupe.OwnershipCost = OwnershipCost; | ||
560 | dupe.ObjectSaleType = ObjectSaleType; | ||
561 | dupe.SalePrice = SalePrice; | ||
562 | dupe.Category = Category; | ||
563 | |||
564 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. | ||
565 | dupe.LastOwnerID = ObjectOwner; | ||
566 | |||
541 | byte[] extraP = new byte[Shape.ExtraParams.Length]; | 567 | byte[] extraP = new byte[Shape.ExtraParams.Length]; |
542 | Array.Copy(Shape.ExtraParams, extraP, extraP.Length); | 568 | Array.Copy(Shape.ExtraParams, extraP, extraP.Length); |
543 | dupe.Shape.ExtraParams = extraP; | 569 | dupe.Shape.ExtraParams = extraP; |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 61402be..07d43b8 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -83,6 +83,7 @@ namespace SimpleApp | |||
83 | 83 | ||
84 | public event UpdateShape OnUpdatePrimShape; | 84 | public event UpdateShape OnUpdatePrimShape; |
85 | public event ObjectExtraParams OnUpdateExtraParams; | 85 | public event ObjectExtraParams OnUpdateExtraParams; |
86 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | ||
86 | public event ObjectSelect OnObjectSelect; | 87 | public event ObjectSelect OnObjectSelect; |
87 | public event GenericCall7 OnObjectDescription; | 88 | public event GenericCall7 OnObjectDescription; |
88 | public event GenericCall7 OnObjectName; | 89 | public event GenericCall7 OnObjectName; |