aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/world/Primitive2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer/world/Primitive2.cs')
-rw-r--r--OpenSim.RegionServer/world/Primitive2.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/OpenSim.RegionServer/world/Primitive2.cs b/OpenSim.RegionServer/world/Primitive2.cs
index 87a1d65..4a19040 100644
--- a/OpenSim.RegionServer/world/Primitive2.cs
+++ b/OpenSim.RegionServer/world/Primitive2.cs
@@ -169,6 +169,72 @@ namespace OpenSim.world
169 169
170 } 170 }
171 171
172 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
173 {
174 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
175 objupdate.RegionData.RegionHandle = m_regionHandle;
176 objupdate.RegionData.TimeDilation = 64096;
177
178 objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
179 PrimData PData = new PrimData();
180 this.primData = PData;
181 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
182
183 objupdate.ObjectData[0] = new ObjectUpdatePacket.ObjectDataBlock();
184 objupdate.ObjectData[0].PSBlock = new byte[0];
185 objupdate.ObjectData[0].ExtraParams = new byte[1];
186 objupdate.ObjectData[0].MediaURL = new byte[0];
187 objupdate.ObjectData[0].NameValue = new byte[0];
188 objupdate.ObjectData[0].Text = new byte[0];
189 objupdate.ObjectData[0].TextColor = new byte[4];
190 objupdate.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 0);
191 objupdate.ObjectData[0].JointPivot = new LLVector3(0, 0, 0);
192 objupdate.ObjectData[0].Material = 3;
193 objupdate.ObjectData[0].UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
194 objupdate.ObjectData[0].TextureAnim = new byte[0];
195 objupdate.ObjectData[0].Sound = LLUUID.Zero;
196 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
197 this.primData.Texture = objupdate.ObjectData[0].TextureEntry = ntex.ToBytes();
198 objupdate.ObjectData[0].State = 0;
199 objupdate.ObjectData[0].Data = new byte[0];
200 PData.OwnerID = objupdate.ObjectData[0].OwnerID = agentID;
201 PData.PCode = objupdate.ObjectData[0].PCode = addPacket.ObjectData.PCode;
202 PData.PathBegin = objupdate.ObjectData[0].PathBegin = addPacket.ObjectData.PathBegin;
203 PData.PathEnd = objupdate.ObjectData[0].PathEnd = addPacket.ObjectData.PathEnd;
204 PData.PathScaleX = objupdate.ObjectData[0].PathScaleX = addPacket.ObjectData.PathScaleX;
205 PData.PathScaleY = objupdate.ObjectData[0].PathScaleY = addPacket.ObjectData.PathScaleY;
206 PData.PathShearX = objupdate.ObjectData[0].PathShearX = addPacket.ObjectData.PathShearX;
207 PData.PathShearY = objupdate.ObjectData[0].PathShearY = addPacket.ObjectData.PathShearY;
208 PData.PathSkew = objupdate.ObjectData[0].PathSkew = addPacket.ObjectData.PathSkew;
209 PData.ProfileBegin = objupdate.ObjectData[0].ProfileBegin = addPacket.ObjectData.ProfileBegin;
210 PData.ProfileEnd = objupdate.ObjectData[0].ProfileEnd = addPacket.ObjectData.ProfileEnd;
211 PData.Scale = objupdate.ObjectData[0].Scale = addPacket.ObjectData.Scale;
212 PData.PathCurve = objupdate.ObjectData[0].PathCurve = addPacket.ObjectData.PathCurve;
213 PData.ProfileCurve = objupdate.ObjectData[0].ProfileCurve = addPacket.ObjectData.ProfileCurve;
214 PData.ParentID = objupdate.ObjectData[0].ParentID = 0;
215 PData.ProfileHollow = objupdate.ObjectData[0].ProfileHollow = addPacket.ObjectData.ProfileHollow;
216 PData.PathRadiusOffset = objupdate.ObjectData[0].PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
217 PData.PathRevolutions = objupdate.ObjectData[0].PathRevolutions = addPacket.ObjectData.PathRevolutions;
218 PData.PathTaperX = objupdate.ObjectData[0].PathTaperX = addPacket.ObjectData.PathTaperX;
219 PData.PathTaperY = objupdate.ObjectData[0].PathTaperY = addPacket.ObjectData.PathTaperY;
220 PData.PathTwist = objupdate.ObjectData[0].PathTwist = addPacket.ObjectData.PathTwist;
221 PData.PathTwistBegin = objupdate.ObjectData[0].PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
222 objupdate.ObjectData[0].ID = (uint)(localID);
223 objupdate.ObjectData[0].FullID = new LLUUID("edba7151-5857-acc5-b30b-f01efef" + (localID - 702000).ToString("00000"));
224 objupdate.ObjectData[0].ObjectData = new byte[60];
225 objupdate.ObjectData[0].ObjectData[46] = 128;
226 objupdate.ObjectData[0].ObjectData[47] = 63;
227 LLVector3 pos1 = addPacket.ObjectData.RayEnd;
228 //update position
229 byte[] pb = pos1.GetBytes();
230 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 0, pb.Length);
231 //this.newPrimFlag = true;
232 this.primData.FullID = this.uuid = objupdate.ObjectData[0].FullID;
233 this.localid = objupdate.ObjectData[0].ID;
234 this.primData.Position = this.Pos = pos1;
235 this.OurPacket = objupdate;
236 }
237
172 public void SendFullUpdateToClient(SimClient RemoteClient) 238 public void SendFullUpdateToClient(SimClient RemoteClient)
173 { 239 {
174 240