aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-29 02:04:44 +0000
committerTeravus Ovares2008-06-29 02:04:44 +0000
commit7f847166a931d88a236fc1cf1de96dccdc1dc2bf (patch)
tree5db02a7eda6beb772789270f6c448e143c6de205 /OpenSim/Region
parentsmall change to see if that helps with the inventory problems. (diff)
downloadopensim-SC_OLD-7f847166a931d88a236fc1cf1de96dccdc1dc2bf.zip
opensim-SC_OLD-7f847166a931d88a236fc1cf1de96dccdc1dc2bf.tar.gz
opensim-SC_OLD-7f847166a931d88a236fc1cf1de96dccdc1dc2bf.tar.bz2
opensim-SC_OLD-7f847166a931d88a236fc1cf1de96dccdc1dc2bf.tar.xz
* Syncs the current revision XML Schema(xsd) to the XML Schema of revision 5251.
* This should resolve creating content, taking it, and being able to rez it again.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs21
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs463
2 files changed, 254 insertions, 230 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index dc195f8..8e81702 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -44,15 +44,7 @@ namespace OpenSim.Region.Environment.Scenes
44 private string m_inventoryFileName = String.Empty; 44 private string m_inventoryFileName = String.Empty;
45 private int m_inventoryFileNameSerial = 0; 45 private int m_inventoryFileNameSerial = 0;
46 46
47 /// <summary> 47
48 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see
49 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim.
50 /// </summary>
51 public LLUUID FolderID
52 {
53 get { return UUID; }
54 set { } // Don't allow assignment, or legacy prims wil b0rk
55 }
56 48
57 /// <summary> 49 /// <summary>
58 /// Serial count for inventory file , used to tell if inventory has changed 50 /// Serial count for inventory file , used to tell if inventory has changed
@@ -60,22 +52,13 @@ namespace OpenSim.Region.Environment.Scenes
60 /// </summary> 52 /// </summary>
61 protected uint m_inventorySerial = 0; 53 protected uint m_inventorySerial = 0;
62 54
63 public uint InventorySerial
64 {
65 get { return m_inventorySerial; }
66 set { m_inventorySerial = value; }
67 }
68 55
69 /// <summary> 56 /// <summary>
70 /// Holds in memory prim inventory 57 /// Holds in memory prim inventory
71 /// </summary> 58 /// </summary>
72 protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); 59 protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary();
73 60
74 public TaskInventoryDictionary TaskInventory 61
75 {
76 get { return m_taskInventory; }
77 set { m_taskInventory = value; }
78 }
79 62
80 /// <summary> 63 /// <summary>
81 /// Tracks whether inventory has changed since the last persistent backup 64 /// Tracks whether inventory has changed since the last persistent backup
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index f9ee542..4a68514 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -101,30 +101,17 @@ namespace OpenSim.Region.Environment.Scenes
101 101
102 [XmlIgnore] 102 [XmlIgnore]
103 public bool AllowedDrop = false; 103 public bool AllowedDrop = false;
104 public uint BaseMask = (uint)PermissionMask.All; 104
105 public uint Category;
106 public Int32 CreationDate;
107 private LLUUID _creatorID;
108 [XmlIgnore] 105 [XmlIgnore]
109 public bool DIE_AT_EDGE = false; 106 public bool DIE_AT_EDGE = false;
110 public uint EveryoneMask = (uint)PermissionMask.None;
111 public LLObject.ObjectFlags Flags = LLObject.ObjectFlags.None;
112 public LLUUID GroupID;
113 public uint GroupMask = (uint)PermissionMask.None;
114 public LLUUID LastOwnerID;
115 public uint NextOwnerMask = (uint)PermissionMask.All;
116 public byte ObjectSaleType;
117 public LLUUID OwnerID;
118 public uint OwnerMask = (uint)PermissionMask.All;
119 public int OwnershipCost;
120 public uint ParentID = 0;
121 107
122 // TODO: This needs to be persisted in next XML version update! 108 // TODO: This needs to be persisted in next XML version update!
123 [XmlIgnore] 109 [XmlIgnore]
124 public int[] PayPrice = {-2,-2,-2,-2,-2}; 110 public int[] PayPrice = {-2,-2,-2,-2,-2};
125 [XmlIgnore] 111 [XmlIgnore]
126 public PhysicsActor PhysActor = null; 112 public PhysicsActor PhysActor = null;
127 public int SalePrice; 113
114
128 115
129 //Xantor 20080528 Sound stuff: 116 //Xantor 20080528 Sound stuff:
130 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. 117 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
@@ -158,7 +145,8 @@ namespace OpenSim.Region.Environment.Scenes
158 public uint m_attachmentPoint = (byte)0; 145 public uint m_attachmentPoint = (byte)0;
159 [XmlIgnore] 146 [XmlIgnore]
160 public PhysicsVector m_rotationAxis = new PhysicsVector(1f,1f,1f); 147 public PhysicsVector m_rotationAxis = new PhysicsVector(1f,1f,1f);
161 public LLUUID m_sitTargetAvatar = LLUUID.Zero; 148
149
162 [XmlIgnore] 150 [XmlIgnore]
163 public bool m_undoing = false; 151 public bool m_undoing = false;
164 152
@@ -181,6 +169,7 @@ namespace OpenSim.Region.Environment.Scenes
181 private string m_text = String.Empty; 169 private string m_text = String.Empty;
182 private string m_touchName = String.Empty; 170 private string m_touchName = String.Empty;
183 private UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); 171 private UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
172 private LLUUID _creatorID;
184 173
185 /// <summary> 174 /// <summary>
186 /// Only used internally to schedule client updates. 175 /// Only used internally to schedule client updates.
@@ -346,70 +335,98 @@ namespace OpenSim.Region.Environment.Scenes
346 335
347 #endregion Constructors 336 #endregion Constructors
348 337
349 #region Public Properties 338 #region XML Schema
350 339
351 public LLVector3 AbsolutePosition 340 public LLUUID LastOwnerID;
352 { 341 public LLUUID OwnerID;
353 get { 342 public LLUUID GroupID;
354 if (m_IsAttachment) 343 public int OwnershipCost;
355 return GroupPosition; 344 public byte ObjectSaleType;
345 public int SalePrice;
346 public uint Category;
347 public Int32 CreationDate;
348 public uint ParentID = 0;
349 public LLUUID m_sitTargetAvatar = LLUUID.Zero;
350 public uint BaseMask = (uint)PermissionMask.All;
351 public uint OwnerMask = (uint)PermissionMask.All;
352 public uint GroupMask = (uint)PermissionMask.None;
353 public uint EveryoneMask = (uint)PermissionMask.None;
354 public uint NextOwnerMask = (uint)PermissionMask.All;
355 public LLObject.ObjectFlags Flags = LLObject.ObjectFlags.None;
356
357 public LLUUID CreatorID {
358 get
359 {
360 return _creatorID;
361 }
362 set
363 {
364 _creatorID = value;
365 }
366 }
356 367
357 return m_offsetPosition + m_groupPosition; } 368 /// <summary>
369 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see
370 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim.
371 /// </summary>
372 public LLUUID FolderID
373 {
374 get { return UUID; }
375 set { } // Don't allow assignment, or legacy prims wil b0rk
358 } 376 }
359 377
360 /// <summary></summary> 378 public uint InventorySerial
361 public LLVector3 Acceleration
362 { 379 {
363 get { return m_acceleration; } 380 get { return m_inventorySerial; }
364 set { m_acceleration = value; } 381 set { m_inventorySerial = value; }
365 } 382 }
366 383
367 /// <summary></summary> 384 public TaskInventoryDictionary TaskInventory
368 public LLVector3 AngularVelocity
369 { 385 {
370 get { return m_angularVelocity; } 386 get { return m_taskInventory; }
371 set { m_angularVelocity = value; } 387 set { m_taskInventory = value; }
372 } 388 }
373 389
374 public byte ClickAction 390 public uint ObjectFlags
375 { 391 {
376 get { return m_clickAction; } 392 get { return (uint)Flags; }
377 set 393 set { Flags = (LLObject.ObjectFlags)value; }
378 { 394 }
379 m_clickAction = value; 395
380 } 396 public LLUUID UUID
397 {
398 get { return m_uuid; }
399 set { m_uuid = value; }
381 } 400 }
382 401
383 public LLUUID CreatorID { 402 public uint LocalId
384 get 403 {
385 { 404 get { return m_localId; }
386 return _creatorID; 405 set { m_localId = value; }
387 }
388 set
389 {
390 _creatorID = value;
391 }
392 } 406 }
393 407
394 public Color Color 408 public virtual string Name
395 { 409 {
396 get { return m_color; } 410 get { return m_name; }
397 set 411 set { m_name = value; }
398 { 412 }
399 m_color = value; 413
400 TriggerScriptChangedEvent(Changed.COLOR); 414 public byte Material
415 {
416 get { return (byte) m_material; }
417 set { m_material = (LLObject.MaterialType) value; }
418 }
401 419
402 /* ScheduleFullUpdate() need not be called b/c after 420 public ulong RegionHandle
403 * setting the color, the text will be set, so then 421 {
404 * ScheduleFullUpdate() will be called. */ 422 get { return m_regionHandle; }
405 //ScheduleFullUpdate(); 423 set { m_regionHandle = value; }
406 }
407 } 424 }
408 425
409 public string Description 426 public int ScriptAccessPin
410 { 427 {
411 get { return m_description; } 428 get { return m_scriptAccessPin; }
412 set { m_description = value; } 429 set { m_scriptAccessPin = (int)value; }
413 } 430 }
414 431
415 public LLVector3 GroupPosition 432 public LLVector3 GroupPosition
@@ -474,51 +491,6 @@ namespace OpenSim.Region.Environment.Scenes
474 } 491 }
475 } 492 }
476 493
477 public int LinkNum
478 {
479 get { return m_linkNum; }
480 set
481 {
482 m_linkNum = value;
483 TriggerScriptChangedEvent(Changed.LINK);
484
485 }
486 }
487
488 public uint LocalId
489 {
490 get { return m_localId; }
491 set { m_localId = value; }
492 }
493
494 public byte Material
495 {
496 get { return (byte) m_material; }
497 set { m_material = (LLObject.MaterialType) value; }
498 }
499
500 public virtual string Name
501 {
502 get { return m_name; }
503 set { m_name = value; }
504 }
505
506 public LLUUID ObjectCreator
507 {
508 get { return _creatorID; }
509 }
510
511 public uint ObjectFlags
512 {
513 get { return (uint)Flags; }
514 set { Flags = (LLObject.ObjectFlags)value; }
515 }
516
517 public LLUUID ObjectOwner
518 {
519 get { return OwnerID; }
520 }
521
522 public LLVector3 OffsetPosition 494 public LLVector3 OffsetPosition
523 { 495 {
524 get { return m_offsetPosition; } 496 get { return m_offsetPosition; }
@@ -526,31 +498,20 @@ namespace OpenSim.Region.Environment.Scenes
526 { 498 {
527 StoreUndoState(); 499 StoreUndoState();
528 m_offsetPosition = value; 500 m_offsetPosition = value;
529 try 501 try
530 { 502 {
531 // Hack to get the child prim to update world positions in the physics engine 503 // Hack to get the child prim to update world positions in the physics engine
532 ParentGroup.ResetChildPrimPhysicsPositions(); 504 ParentGroup.ResetChildPrimPhysicsPositions();
533 505
534 } 506 }
535 catch (NullReferenceException) 507 catch (NullReferenceException)
536 { 508 {
537 // Ignore, and skip over. 509 // Ignore, and skip over.
538 } 510 }
539 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); 511 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
540 } 512 }
541 } 513 }
542 514
543 public SceneObjectGroup ParentGroup
544 {
545 get { return m_parentGroup; }
546 }
547
548 public ulong RegionHandle
549 {
550 get { return m_regionHandle; }
551 set { m_regionHandle = value; }
552 }
553
554 public LLQuaternion RotationOffset 515 public LLQuaternion RotationOffset
555 { 516 {
556 get 517 get
@@ -603,7 +564,8 @@ namespace OpenSim.Region.Environment.Scenes
603 } 564 }
604 } 565 }
605 566
606 public LLVector3 RotationalVelocity 567 /// <summary></summary>
568 public LLVector3 Velocity
607 { 569 {
608 get 570 get
609 { 571 {
@@ -614,85 +576,82 @@ namespace OpenSim.Region.Environment.Scenes
614 { 576 {
615 if (PhysActor.IsPhysical) 577 if (PhysActor.IsPhysical)
616 { 578 {
617 m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(),0); 579 m_velocity.X = PhysActor.Velocity.X;
580 m_velocity.Y = PhysActor.Velocity.Y;
581 m_velocity.Z = PhysActor.Velocity.Z;
618 } 582 }
619 } 583 }
620 584
621 return m_rotationalvelocity; 585 return m_velocity;
622 } 586 }
623 set { m_rotationalvelocity = value; }
624 }
625 587
626 public LLVector3 Scale
627 {
628 get { return m_shape.Scale; }
629 set 588 set
630 { 589 {
631 StoreUndoState(); 590 m_velocity = value;
632 m_shape.Scale = value; 591 if (PhysActor != null)
633
634 if (PhysActor != null && m_parentGroup != null)
635 { 592 {
636 if (m_parentGroup.Scene != null) 593 if (PhysActor.IsPhysical)
637 { 594 {
638 if (m_parentGroup.Scene.PhysicsScene != null) 595 PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
639 { 596 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
640 PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z);
641 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
642 }
643 } 597 }
644 } 598 }
645 TriggerScriptChangedEvent(Changed.SCALE);
646 } 599 }
647 } 600 }
648 601
649 public int ScriptAccessPin 602 public LLVector3 RotationalVelocity
650 {
651 get { return m_scriptAccessPin; }
652 set { m_scriptAccessPin = (int)value; }
653 }
654
655 public scriptEvents ScriptEvents
656 {
657 get { return m_aggregateScriptEvents; }
658 }
659
660 public PrimitiveBaseShape Shape
661 { 603 {
662 get { return m_shape; } 604 get
663 set
664 { 605 {
665 m_shape = value; 606 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0
666 TriggerScriptChangedEvent(Changed.SHAPE); 607 //|| PhysActor.Velocity.z != 0)
608 //{
609 if (PhysActor != null)
610 {
611 if (PhysActor.IsPhysical)
612 {
613 m_rotationalvelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0);
614 }
615 }
616
617 return m_rotationalvelocity;
667 } 618 }
619 set { m_rotationalvelocity = value; }
668 } 620 }
669 621
670 public string SitName 622 /// <summary></summary>
623 public LLVector3 AngularVelocity
671 { 624 {
672 get { return m_sitName; } 625 get { return m_angularVelocity; }
673 set { m_sitName = value; } 626 set { m_angularVelocity = value; }
674 } 627 }
675 628
676 public Quaternion SitTargetOrientation 629 /// <summary></summary>
630 public LLVector3 Acceleration
677 { 631 {
678 get { return m_sitTargetOrientation; } 632 get { return m_acceleration; }
633 set { m_acceleration = value; }
679 } 634 }
680 635
681 public Vector3 SitTargetPosition 636
637 public string Description
682 { 638 {
683 get { return m_sitTargetPosition; } 639 get { return m_description; }
640 set { m_description = value; }
684 } 641 }
685 642
686 public bool Stopped 643 public Color Color
687 { 644 {
688 get { 645 get { return m_color; }
689 double threshold = 0.02; 646 set
690 return (Math.Abs(Velocity.X) < threshold && 647 {
691 Math.Abs(Velocity.Y) < threshold && 648 m_color = value;
692 Math.Abs(Velocity.Z) < threshold && 649 TriggerScriptChangedEvent(Changed.COLOR);
693 Math.Abs(AngularVelocity.X) < threshold && 650
694 Math.Abs(AngularVelocity.Y) < threshold && 651 /* ScheduleFullUpdate() need not be called b/c after
695 Math.Abs(AngularVelocity.Z) < threshold); 652 * setting the color, the text will be set, so then
653 * ScheduleFullUpdate() will be called. */
654 //ScheduleFullUpdate();
696 } 655 }
697 } 656 }
698 657
@@ -713,60 +672,142 @@ namespace OpenSim.Region.Environment.Scenes
713 } 672 }
714 } 673 }
715 674
675
676 public string SitName
677 {
678 get { return m_sitName; }
679 set { m_sitName = value; }
680 }
681
716 public string TouchName 682 public string TouchName
717 { 683 {
718 get { return m_touchName; } 684 get { return m_touchName; }
719 set { m_touchName = value; } 685 set { m_touchName = value; }
720 } 686 }
721 687
722 public LLUUID UUID 688 public int LinkNum
723 { 689 {
724 get { return m_uuid; } 690 get { return m_linkNum; }
725 set { m_uuid = value; } 691 set
692 {
693 m_linkNum = value;
694 TriggerScriptChangedEvent(Changed.LINK);
695
696 }
726 } 697 }
727 698
728 public byte UpdateFlag 699 public byte ClickAction
729 { 700 {
730 get { return m_updateFlag; } 701 get { return m_clickAction; }
731 set { m_updateFlag = value; } 702 set
703 {
704 m_clickAction = value;
705 }
732 } 706 }
733 707
734 /// <summary></summary> 708 public PrimitiveBaseShape Shape
735 public LLVector3 Velocity
736 { 709 {
737 get 710 get { return m_shape; }
711 set
738 { 712 {
739 //if (PhysActor.Velocity.x != 0 || PhysActor.Velocity.y != 0 713 m_shape = value;
740 //|| PhysActor.Velocity.z != 0) 714 TriggerScriptChangedEvent(Changed.SHAPE);
741 //{
742 if (PhysActor != null)
743 {
744 if (PhysActor.IsPhysical)
745 {
746 m_velocity.X = PhysActor.Velocity.X;
747 m_velocity.Y = PhysActor.Velocity.Y;
748 m_velocity.Z = PhysActor.Velocity.Z;
749 }
750 }
751
752 return m_velocity;
753 } 715 }
754 716 }
755 set 717 public LLVector3 Scale
718 {
719 get { return m_shape.Scale; }
720 set
756 { 721 {
757 m_velocity = value; 722 StoreUndoState();
758 if (PhysActor != null) 723 m_shape.Scale = value;
724
725 if (PhysActor != null && m_parentGroup != null)
759 { 726 {
760 if (PhysActor.IsPhysical) 727 if (m_parentGroup.Scene != null)
761 { 728 {
762 PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); 729 if (m_parentGroup.Scene.PhysicsScene != null)
763 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 730 {
731 PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z);
732 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
733 }
764 } 734 }
765 } 735 }
736 TriggerScriptChangedEvent(Changed.SCALE);
737 }
738 }
739 public byte UpdateFlag
740 {
741 get { return m_updateFlag; }
742 set { m_updateFlag = value; }
743 }
744
745 #endregion
746
747//---------------
748
749
750 #region Public Properties with only Get
751
752
753 public LLVector3 AbsolutePosition
754 {
755 get {
756 if (m_IsAttachment)
757 return GroupPosition;
758
759 return m_offsetPosition + m_groupPosition; }
760 }
761
762 public LLUUID ObjectCreator
763 {
764 get { return _creatorID; }
765 }
766
767 public LLUUID ObjectOwner
768 {
769 get { return OwnerID; }
770 }
771
772 public SceneObjectGroup ParentGroup
773 {
774 get { return m_parentGroup; }
775 }
776
777
778
779 public scriptEvents ScriptEvents
780 {
781 get { return m_aggregateScriptEvents; }
782 }
783
784
785 public Quaternion SitTargetOrientation
786 {
787 get { return m_sitTargetOrientation; }
788 }
789
790 public Vector3 SitTargetPosition
791 {
792 get { return m_sitTargetPosition; }
793 }
794
795 public bool Stopped
796 {
797 get {
798 double threshold = 0.02;
799 return (Math.Abs(Velocity.X) < threshold &&
800 Math.Abs(Velocity.Y) < threshold &&
801 Math.Abs(Velocity.Z) < threshold &&
802 Math.Abs(AngularVelocity.X) < threshold &&
803 Math.Abs(AngularVelocity.Y) < threshold &&
804 Math.Abs(AngularVelocity.Z) < threshold);
766 } 805 }
767 } 806 }
768 807
769 #endregion Public Properties 808
809
810 #endregion Public Properties with only Get
770 811
771 #region Private Methods 812 #region Private Methods
772 813