diff options
author | Johan Berntsson | 2008-03-04 05:31:54 +0000 |
---|---|---|
committer | Johan Berntsson | 2008-03-04 05:31:54 +0000 |
commit | 279e0061c515ee0a03036bef68eea9738273d785 (patch) | |
tree | 4502228eb7b87a760e0b0e67aded9d1d870d0bed /OpenSim/Region/Environment/Types/UpdateQueue.cs | |
parent | Added copyright heaaders. Minor cleanup. (diff) | |
download | opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.zip opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.gz opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.bz2 opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.xz |
Merged 3Di code that provides scene and avatar serialization, and plugin support for region move/split/merge. See ThirdParty/3Di/README.txt. Unless the new modules are used there should be no noticeable changes when running OpenSim.
Diffstat (limited to 'OpenSim/Region/Environment/Types/UpdateQueue.cs')
-rw-r--r-- | OpenSim/Region/Environment/Types/UpdateQueue.cs | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Types/UpdateQueue.cs b/OpenSim/Region/Environment/Types/UpdateQueue.cs index 0078678..ce0927c 100644 --- a/OpenSim/Region/Environment/Types/UpdateQueue.cs +++ b/OpenSim/Region/Environment/Types/UpdateQueue.cs | |||
@@ -30,9 +30,14 @@ using System.Collections.Generic; | |||
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Region.Environment.Scenes; | 31 | using OpenSim.Region.Environment.Scenes; |
32 | 32 | ||
33 | using System; | ||
34 | using System.Runtime.Serialization; | ||
35 | using System.Security.Permissions; | ||
36 | |||
33 | namespace OpenSim.Region.Environment.Types | 37 | namespace OpenSim.Region.Environment.Types |
34 | { | 38 | { |
35 | public class UpdateQueue | 39 | [Serializable] |
40 | public class UpdateQueue : ISerializable | ||
36 | { | 41 | { |
37 | private Queue<SceneObjectPart> m_queue; | 42 | private Queue<SceneObjectPart> m_queue; |
38 | 43 | ||
@@ -86,5 +91,46 @@ namespace OpenSim.Region.Environment.Types | |||
86 | 91 | ||
87 | return part; | 92 | return part; |
88 | } | 93 | } |
94 | |||
95 | protected UpdateQueue(SerializationInfo info, StreamingContext context) | ||
96 | { | ||
97 | //System.Console.WriteLine("UpdateQueue Deserialize BGN"); | ||
98 | |||
99 | if (info == null) | ||
100 | { | ||
101 | throw new System.ArgumentNullException("info"); | ||
102 | } | ||
103 | |||
104 | m_queue = (Queue<SceneObjectPart>)info.GetValue("m_queue", typeof(Queue<SceneObjectPart>)); | ||
105 | List<Guid> ids_work = (List<Guid>)info.GetValue("m_ids", typeof(List<Guid>)); | ||
106 | |||
107 | foreach (Guid guid in ids_work) | ||
108 | { | ||
109 | m_ids.Add(new LLUUID(guid)); | ||
110 | } | ||
111 | |||
112 | //System.Console.WriteLine("UpdateQueue Deserialize END"); | ||
113 | } | ||
114 | |||
115 | [SecurityPermission(SecurityAction.LinkDemand, | ||
116 | Flags = SecurityPermissionFlag.SerializationFormatter)] | ||
117 | public virtual void GetObjectData( | ||
118 | SerializationInfo info, StreamingContext context) | ||
119 | { | ||
120 | if (info == null) | ||
121 | { | ||
122 | throw new System.ArgumentNullException("info"); | ||
123 | } | ||
124 | |||
125 | List<Guid> ids_work = new List<Guid>(); | ||
126 | |||
127 | foreach (LLUUID uuid in m_ids) | ||
128 | { | ||
129 | ids_work.Add(uuid.UUID); | ||
130 | } | ||
131 | |||
132 | info.AddValue("m_queue", m_queue); | ||
133 | info.AddValue("m_ids", ids_work); | ||
134 | } | ||
89 | } | 135 | } |
90 | } \ No newline at end of file | 136 | } |