aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs57
1 files changed, 2 insertions, 55 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 3501224..4d54634 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -216,28 +216,19 @@ namespace OpenSim.Region.Environment.Scenes
216 Rezzed = DateTime.Now; 216 Rezzed = DateTime.Now;
217 } 217 }
218 218
219 public SceneObjectPart(SceneObjectGroup parent, UUID ownerID,
220 PrimitiveBaseShape shape, Vector3 groupPosition, Vector3 offsetPosition)
221 : this(parent, ownerID, shape, groupPosition, Quaternion.Identity, offsetPosition)
222 {
223 }
224
225 /// <summary> 219 /// <summary>
226 /// Create a completely new SceneObjectPart (prim) 220 /// Create a completely new SceneObjectPart (prim). This will need to be added separately to a SceneObjectGroup
227 /// </summary> 221 /// </summary>
228 /// <param name="regionHandle"></param>
229 /// <param name="parent"></param>
230 /// <param name="ownerID"></param> 222 /// <param name="ownerID"></param>
231 /// <param name="shape"></param> 223 /// <param name="shape"></param>
232 /// <param name="position"></param> 224 /// <param name="position"></param>
233 /// <param name="rotationOffset"></param> 225 /// <param name="rotationOffset"></param>
234 /// <param name="offsetPosition"></param> 226 /// <param name="offsetPosition"></param>
235 public SceneObjectPart( 227 public SceneObjectPart(
236 SceneObjectGroup parent, UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, 228 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
237 Quaternion rotationOffset, Vector3 offsetPosition) 229 Quaternion rotationOffset, Vector3 offsetPosition)
238 { 230 {
239 m_name = "Primitive"; 231 m_name = "Primitive";
240 m_parentGroup = parent;
241 232
242 Rezzed = DateTime.Now; 233 Rezzed = DateTime.Now;
243 _creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 234 _creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
@@ -273,49 +264,6 @@ namespace OpenSim.Region.Environment.Scenes
273 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); 264 //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
274 } 265 }
275 266
276 /// <summary>
277 /// Re/create a SceneObjectPart (prim)
278 /// currently not used, and maybe won't be
279 /// </summary>
280 /// <param name="regionHandle"></param>
281 /// <param name="parent"></param>
282 /// <param name="ownerID"></param>
283 /// <param name="localID"></param>
284 /// <param name="shape"></param>
285 /// <param name="position"></param>
286 public SceneObjectPart(SceneObjectGroup parent, int creationDate, UUID ownerID,
287 UUID creatorID, UUID lastOwnerID, PrimitiveBaseShape shape,
288 Vector3 position, Quaternion rotation, uint flags)
289 {
290 m_parentGroup = parent;
291 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
292 _creationDate = creationDate;
293 _ownerID = ownerID;
294 _creatorID = creatorID;
295 _lastOwnerID = lastOwnerID;
296 UUID = UUID.Random();
297 Shape = shape;
298 _ownershipCost = 0;
299 _objectSaleType = (byte) 0;
300 _salePrice = 0;
301 _category = (uint) 0;
302 _lastOwnerID = _creatorID;
303 OffsetPosition = position;
304 RotationOffset = rotation;
305 ObjectFlags = flags;
306
307 Rezzed = DateTime.Now;
308
309 m_TextureAnimation = new byte[0];
310 m_particleSystem = new byte[0];
311 // Since we don't store script state, this is only a 'temporary' objectflag now
312 // If the object is scripted, the script will get loaded and this will be set again
313 ObjectFlags &= ~(uint)(PrimFlags.Scripted | PrimFlags.Touch);
314
315 TrimPermissions();
316 // ApplyPhysics();
317 }
318
319 protected SceneObjectPart(SerializationInfo info, StreamingContext context) 267 protected SceneObjectPart(SerializationInfo info, StreamingContext context)
320 { 268 {
321 //System.Console.WriteLine("SceneObjectPart Deserialize BGN"); 269 //System.Console.WriteLine("SceneObjectPart Deserialize BGN");
@@ -3056,7 +3004,6 @@ if (m_shape != null) {
3056 3004
3057 public void UpdatePrimFlags(bool UsePhysics, bool IsTemporary, bool IsPhantom) 3005 public void UpdatePrimFlags(bool UsePhysics, bool IsTemporary, bool IsPhantom)
3058 { 3006 {
3059
3060 bool wasUsingPhysics = ((ObjectFlags & (uint) PrimFlags.Physics) != 0); 3007 bool wasUsingPhysics = ((ObjectFlags & (uint) PrimFlags.Physics) != 0);
3061 bool wasTemporary = ((ObjectFlags & (uint)PrimFlags.TemporaryOnRez) != 0); 3008 bool wasTemporary = ((ObjectFlags & (uint)PrimFlags.TemporaryOnRez) != 0);
3062 bool wasPhantom = ((ObjectFlags & (uint)PrimFlags.Phantom) != 0); 3009 bool wasPhantom = ((ObjectFlags & (uint)PrimFlags.Phantom) != 0);