diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 119 |
1 files changed, 118 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index a6a5063..46bb89c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -39,6 +39,8 @@ using OpenSim.Framework.Console; | |||
39 | using OpenSim.Region.Environment.Interfaces; | 39 | using OpenSim.Region.Environment.Interfaces; |
40 | using OpenSim.Region.Environment.Scenes.Scripting; | 40 | using OpenSim.Region.Environment.Scenes.Scripting; |
41 | using OpenSim.Region.Physics.Manager; | 41 | using OpenSim.Region.Physics.Manager; |
42 | using System.Runtime.Serialization; | ||
43 | using System.Security.Permissions; | ||
42 | 44 | ||
43 | namespace OpenSim.Region.Environment.Scenes | 45 | namespace OpenSim.Region.Environment.Scenes |
44 | { | 46 | { |
@@ -82,7 +84,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
82 | SCALE = 0x40 | 84 | SCALE = 0x40 |
83 | } | 85 | } |
84 | 86 | ||
85 | public partial class SceneObjectPart : IScriptHost | 87 | [Serializable] |
88 | public partial class SceneObjectPart : IScriptHost, ISerializable | ||
86 | { | 89 | { |
87 | 90 | ||
88 | [XmlIgnore] public PhysicsActor PhysActor = null; | 91 | [XmlIgnore] public PhysicsActor PhysActor = null; |
@@ -1859,5 +1862,119 @@ namespace OpenSim.Region.Environment.Scenes | |||
1859 | (int) (color.z*0xff)); | 1862 | (int) (color.z*0xff)); |
1860 | Text = text; | 1863 | Text = text; |
1861 | } | 1864 | } |
1865 | |||
1866 | protected SceneObjectPart(SerializationInfo info, StreamingContext context) | ||
1867 | { | ||
1868 | //System.Console.WriteLine("SceneObjectPart Deserialize BGN"); | ||
1869 | |||
1870 | if (info == null) | ||
1871 | { | ||
1872 | throw new System.ArgumentNullException("info"); | ||
1873 | } | ||
1874 | |||
1875 | /* | ||
1876 | m_queue = (Queue<SceneObjectPart>)info.GetValue("m_queue", typeof(Queue<SceneObjectPart>)); | ||
1877 | m_ids = (List<LLUUID>)info.GetValue("m_ids", typeof(List<LLUUID>)); | ||
1878 | */ | ||
1879 | |||
1880 | //System.Console.WriteLine("SceneObjectPart Deserialize END"); | ||
1881 | } | ||
1882 | |||
1883 | [SecurityPermission(SecurityAction.LinkDemand, | ||
1884 | Flags = SecurityPermissionFlag.SerializationFormatter)] | ||
1885 | public virtual void GetObjectData( | ||
1886 | SerializationInfo info, StreamingContext context) | ||
1887 | { | ||
1888 | if (info == null) | ||
1889 | { | ||
1890 | throw new System.ArgumentNullException("info"); | ||
1891 | } | ||
1892 | |||
1893 | info.AddValue("m_inventoryFileName", m_inventoryFileName); | ||
1894 | info.AddValue("m_folderID", m_folderID.UUID); | ||
1895 | info.AddValue("PhysActor", PhysActor); | ||
1896 | |||
1897 | Dictionary<Guid, TaskInventoryItem> TaskInventory_work = new Dictionary<Guid, TaskInventoryItem>(); | ||
1898 | |||
1899 | foreach (LLUUID id in TaskInventory.Keys) | ||
1900 | { | ||
1901 | TaskInventory_work.Add(id.UUID, TaskInventory[id]); | ||
1902 | } | ||
1903 | |||
1904 | info.AddValue("TaskInventory", TaskInventory_work); | ||
1905 | |||
1906 | info.AddValue("LastOwnerID", LastOwnerID.UUID); | ||
1907 | info.AddValue("OwnerID", OwnerID.UUID); | ||
1908 | info.AddValue("GroupID", GroupID.UUID); | ||
1909 | |||
1910 | info.AddValue("OwnershipCost", OwnershipCost); | ||
1911 | info.AddValue("ObjectSaleType", ObjectSaleType); | ||
1912 | info.AddValue("SalePrice", SalePrice); | ||
1913 | info.AddValue("Category", Category); | ||
1914 | |||
1915 | info.AddValue("CreationDate", CreationDate); | ||
1916 | info.AddValue("ParentID", ParentID); | ||
1917 | |||
1918 | info.AddValue("OwnerMask", OwnerMask); | ||
1919 | info.AddValue("NextOwnerMask", NextOwnerMask); | ||
1920 | info.AddValue("GroupMask", GroupMask); | ||
1921 | info.AddValue("EveryoneMask", EveryoneMask); | ||
1922 | info.AddValue("BaseMask", BaseMask); | ||
1923 | |||
1924 | info.AddValue("m_particleSystem", m_particleSystem); | ||
1925 | |||
1926 | info.AddValue("TimeStampFull", TimeStampFull); | ||
1927 | info.AddValue("TimeStampTerse", TimeStampTerse); | ||
1928 | info.AddValue("TimeStampLastActivity", TimeStampLastActivity); | ||
1929 | |||
1930 | info.AddValue("m_updateFlag", m_updateFlag); | ||
1931 | info.AddValue("CreatorID", CreatorID.UUID); | ||
1932 | |||
1933 | info.AddValue("m_inventorySerial", m_inventorySerial); | ||
1934 | info.AddValue("m_uuid", m_uuid.UUID); | ||
1935 | info.AddValue("m_localID", m_localID); | ||
1936 | info.AddValue("m_name", m_name); | ||
1937 | info.AddValue("m_flags", Flags); | ||
1938 | info.AddValue("m_material", m_material); | ||
1939 | info.AddValue("m_regionHandle", m_regionHandle); | ||
1940 | |||
1941 | info.AddValue("m_groupPosition.X", m_groupPosition.X); | ||
1942 | info.AddValue("m_groupPosition.Y", m_groupPosition.Y); | ||
1943 | info.AddValue("m_groupPosition.Z", m_groupPosition.Z); | ||
1944 | |||
1945 | info.AddValue("m_offsetPosition.X", m_offsetPosition.X); | ||
1946 | info.AddValue("m_offsetPosition.Y", m_offsetPosition.Y); | ||
1947 | info.AddValue("m_offsetPosition.Z", m_offsetPosition.Z); | ||
1948 | |||
1949 | info.AddValue("m_rotationOffset.W", m_rotationOffset.W); | ||
1950 | info.AddValue("m_rotationOffset.X", m_rotationOffset.X); | ||
1951 | info.AddValue("m_rotationOffset.Y", m_rotationOffset.Y); | ||
1952 | info.AddValue("m_rotationOffset.Z", m_rotationOffset.Z); | ||
1953 | |||
1954 | info.AddValue("m_velocity.X", m_velocity.X); | ||
1955 | info.AddValue("m_velocity.Y", m_velocity.Y); | ||
1956 | info.AddValue("m_velocity.Z", m_velocity.Z); | ||
1957 | |||
1958 | info.AddValue("m_rotationalvelocity.X", m_rotationalvelocity.X); | ||
1959 | info.AddValue("m_rotationalvelocity.Y", m_rotationalvelocity.Y); | ||
1960 | info.AddValue("m_rotationalvelocity.Z", m_rotationalvelocity.Z); | ||
1961 | |||
1962 | info.AddValue("m_angularVelocity.X", m_angularVelocity.X); | ||
1963 | info.AddValue("m_angularVelocity.Y", m_angularVelocity.Y); | ||
1964 | info.AddValue("m_angularVelocity.Z", m_angularVelocity.Z); | ||
1965 | |||
1966 | info.AddValue("m_acceleration.X", m_acceleration.X); | ||
1967 | info.AddValue("m_acceleration.Y", m_acceleration.Y); | ||
1968 | info.AddValue("m_acceleration.Z", m_acceleration.Z); | ||
1969 | |||
1970 | info.AddValue("m_description", m_description); | ||
1971 | info.AddValue("m_color", m_color); | ||
1972 | info.AddValue("m_text", m_text); | ||
1973 | info.AddValue("m_sitName", m_sitName); | ||
1974 | info.AddValue("m_touchName", m_touchName); | ||
1975 | info.AddValue("m_clickAction", m_clickAction); | ||
1976 | info.AddValue("m_shape", m_shape); | ||
1977 | info.AddValue("m_parentGroup", m_parentGroup); | ||
1978 | } | ||
1862 | } | 1979 | } |
1863 | } | 1980 | } |