aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authormeta72010-08-10 09:11:55 -0700
committermeta72010-08-10 09:11:55 -0700
commit9fba4b66bbfe27d104f1d00a9591343dc9998d33 (patch)
tree56aaf9aa7092feda4725bb413637baf0ba8c5b36 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentAdd a stack trace to the error output on the recursive read lock warning on m... (diff)
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
downloadopensim-SC_OLD-9fba4b66bbfe27d104f1d00a9591343dc9998d33.zip
opensim-SC_OLD-9fba4b66bbfe27d104f1d00a9591343dc9998d33.tar.gz
opensim-SC_OLD-9fba4b66bbfe27d104f1d00a9591343dc9998d33.tar.bz2
opensim-SC_OLD-9fba4b66bbfe27d104f1d00a9591343dc9998d33.tar.xz
Resolve merge failure
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs92
1 files changed, 59 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 77581af..fbe1da9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -151,8 +151,17 @@ namespace OpenSim.Region.Framework.Scenes
151 // TODO: This needs to be persisted in next XML version update! 151 // TODO: This needs to be persisted in next XML version update!
152 [XmlIgnore] 152 [XmlIgnore]
153 public int[] PayPrice = {-2,-2,-2,-2,-2}; 153 public int[] PayPrice = {-2,-2,-2,-2,-2};
154
154 [XmlIgnore] 155 [XmlIgnore]
155 public PhysicsActor PhysActor; 156 public PhysicsActor PhysActor
157 {
158 get { return m_physActor; }
159 set
160 {
161// m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID);
162 m_physActor = value;
163 }
164 }
156 165
157 //Xantor 20080528 Sound stuff: 166 //Xantor 20080528 Sound stuff:
158 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. 167 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
@@ -307,6 +316,7 @@ namespace OpenSim.Region.Framework.Scenes
307 /// </summary> 316 /// </summary>
308 private byte m_updateFlag; 317 private byte m_updateFlag;
309 318
319 private PhysicsActor m_physActor;
310 protected Vector3 m_acceleration; 320 protected Vector3 m_acceleration;
311 protected Vector3 m_angularVelocity; 321 protected Vector3 m_angularVelocity;
312 322
@@ -406,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
406 // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from 416 // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
407 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log 417 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
408 418
409 _flags = 0; 419 Flags = 0;
410 CreateSelected = true; 420 CreateSelected = true;
411 421
412 TrimPermissions(); 422 TrimPermissions();
@@ -434,7 +444,7 @@ namespace OpenSim.Region.Framework.Scenes
434 private uint _groupMask = (uint)PermissionMask.None; 444 private uint _groupMask = (uint)PermissionMask.None;
435 private uint _everyoneMask = (uint)PermissionMask.None; 445 private uint _everyoneMask = (uint)PermissionMask.None;
436 private uint _nextOwnerMask = (uint)PermissionMask.All; 446 private uint _nextOwnerMask = (uint)PermissionMask.All;
437 private PrimFlags _flags = 0; 447 private PrimFlags _flags = PrimFlags.None;
438 private DateTime m_expires; 448 private DateTime m_expires;
439 private DateTime m_rezzed; 449 private DateTime m_rezzed;
440 private bool m_createSelected = false; 450 private bool m_createSelected = false;
@@ -485,10 +495,14 @@ namespace OpenSim.Region.Framework.Scenes
485 } 495 }
486 } 496 }
487 497
498 /// <summary>
499 /// This is idential to the Flags property, except that the returned value is uint rather than PrimFlags
500 /// </summary>
501 [Obsolete("Use Flags property instead")]
488 public uint ObjectFlags 502 public uint ObjectFlags
489 { 503 {
490 get { return (uint)_flags; } 504 get { return (uint)Flags; }
491 set { _flags = (PrimFlags)value; } 505 set { Flags = (PrimFlags)value; }
492 } 506 }
493 507
494 public UUID UUID 508 public UUID UUID
@@ -718,20 +732,20 @@ namespace OpenSim.Region.Framework.Scenes
718 732
719 // Tell the physics engines that this prim changed. 733 // Tell the physics engines that this prim changed.
720 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 734 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
721 } 735 }
722 736
723 if (!m_parentGroup.m_dupeInProgress) 737 if (!m_parentGroup.m_dupeInProgress)
724 { 738 {
725 List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); 739 List<ScenePresence> avs = ParentGroup.GetLinkedAvatars();
726 foreach (ScenePresence av in avs) 740 foreach (ScenePresence av in avs)
727 { 741 {
728 if (av.LinkedPrim == m_uuid) 742 if (av.LinkedPrim == m_uuid)
729 { 743 {
730 Vector3 offset = (m_offsetPosition - oldpos); 744 Vector3 offset = (m_offsetPosition - oldpos);
731 av.OffsetPosition += offset; 745 av.OffsetPosition += offset;
732 av.SendFullUpdateToAllClients(); 746 av.SendFullUpdateToAllClients();
733 } 747 }
734 } 748 }
735 } 749 }
736 } 750 }
737 TriggerScriptChangedEvent(Changed.POSITION); 751 TriggerScriptChangedEvent(Changed.POSITION);
@@ -1026,7 +1040,11 @@ namespace OpenSim.Region.Framework.Scenes
1026 public bool CreateSelected 1040 public bool CreateSelected
1027 { 1041 {
1028 get { return m_createSelected; } 1042 get { return m_createSelected; }
1029 set { m_createSelected = value; } 1043 set
1044 {
1045// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID);
1046 m_createSelected = value;
1047 }
1030 } 1048 }
1031 1049
1032 #endregion 1050 #endregion
@@ -1194,7 +1212,11 @@ namespace OpenSim.Region.Framework.Scenes
1194 public PrimFlags Flags 1212 public PrimFlags Flags
1195 { 1213 {
1196 get { return _flags; } 1214 get { return _flags; }
1197 set { _flags = value; } 1215 set
1216 {
1217// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value);
1218 _flags = value;
1219 }
1198 } 1220 }
1199 1221
1200 [XmlIgnore] 1222 [XmlIgnore]
@@ -1329,7 +1351,7 @@ namespace OpenSim.Region.Framework.Scenes
1329 if ((ObjectFlags & (uint) flag) == 0) 1351 if ((ObjectFlags & (uint) flag) == 0)
1330 { 1352 {
1331 //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); 1353 //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
1332 _flags |= flag; 1354 Flags |= flag;
1333 1355
1334 if (flag == PrimFlags.TemporaryOnRez) 1356 if (flag == PrimFlags.TemporaryOnRez)
1335 ResetExpire(); 1357 ResetExpire();
@@ -1554,7 +1576,7 @@ namespace OpenSim.Region.Framework.Scenes
1554 } 1576 }
1555 else 1577 else
1556 { 1578 {
1557 m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); 1579 m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID);
1558 } 1580 }
1559 } 1581 }
1560 } 1582 }
@@ -1824,7 +1846,7 @@ namespace OpenSim.Region.Framework.Scenes
1824 /// that's not wholesome. Had to make Scene public 1846 /// that's not wholesome. Had to make Scene public
1825 //PhysActor = null; 1847 //PhysActor = null;
1826 1848
1827 if ((ObjectFlags & (uint)PrimFlags.Phantom) == 0) 1849 if ((Flags & PrimFlags.Phantom) == 0)
1828 { 1850 {
1829 if (UsePhysics) 1851 if (UsePhysics)
1830 { 1852 {
@@ -1971,12 +1993,14 @@ namespace OpenSim.Region.Framework.Scenes
1971 } 1993 }
1972 1994
1973 public uint GetEffectiveObjectFlags() 1995 public uint GetEffectiveObjectFlags()
1974 { 1996 {
1975 PrimFlags f = _flags; 1997 // Commenting this section of code out since it doesn't actually do anything, as enums are handled by
1976 if (m_parentGroup == null || m_parentGroup.RootPart == this) 1998 // value rather than reference
1977 f &= ~(PrimFlags.Touch | PrimFlags.Money); 1999// PrimFlags f = _flags;
2000// if (m_parentGroup == null || m_parentGroup.RootPart == this)
2001// f &= ~(PrimFlags.Touch | PrimFlags.Money);
1978 2002
1979 return (uint)_flags | (uint)LocalFlags; 2003 return (uint)Flags | (uint)LocalFlags;
1980 } 2004 }
1981 2005
1982 public Vector3 GetGeometricCenter() 2006 public Vector3 GetGeometricCenter()
@@ -2733,10 +2757,10 @@ namespace OpenSim.Region.Framework.Scenes
2733 public void RemFlag(PrimFlags flag) 2757 public void RemFlag(PrimFlags flag)
2734 { 2758 {
2735 // PrimFlags prevflag = Flags; 2759 // PrimFlags prevflag = Flags;
2736 if ((ObjectFlags & (uint) flag) != 0) 2760 if ((Flags & flag) != 0)
2737 { 2761 {
2738 //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); 2762 //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
2739 _flags &= ~flag; 2763 Flags &= ~flag;
2740 } 2764 }
2741 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 2765 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
2742 //ScheduleFullUpdate(); 2766 //ScheduleFullUpdate();
@@ -2999,10 +3023,10 @@ namespace OpenSim.Region.Framework.Scenes
2999 3023
3000 if (remoteClient.AgentId == _ownerID) 3024 if (remoteClient.AgentId == _ownerID)
3001 { 3025 {
3002 if ((uint) (_flags & PrimFlags.CreateSelected) != 0) 3026 if ((Flags & PrimFlags.CreateSelected) != 0)
3003 { 3027 {
3004 clientFlags |= (uint) PrimFlags.CreateSelected; 3028 clientFlags |= (uint) PrimFlags.CreateSelected;
3005 _flags &= ~PrimFlags.CreateSelected; 3029 Flags &= ~PrimFlags.CreateSelected;
3006 } 3030 }
3007 } 3031 }
3008 //bool isattachment = IsAttachment; 3032 //bool isattachment = IsAttachment;
@@ -3308,6 +3332,7 @@ namespace OpenSim.Region.Framework.Scenes
3308 texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f); 3332 texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
3309 tex.FaceTextures[face].RGBA = texcolor; 3333 tex.FaceTextures[face].RGBA = texcolor;
3310 UpdateTexture(tex); 3334 UpdateTexture(tex);
3335 TriggerScriptChangedEvent(Changed.COLOR);
3311 return; 3336 return;
3312 } 3337 }
3313 else if (face == ALL_SIDES) 3338 else if (face == ALL_SIDES)
@@ -3329,6 +3354,7 @@ namespace OpenSim.Region.Framework.Scenes
3329 tex.DefaultTexture.RGBA = texcolor; 3354 tex.DefaultTexture.RGBA = texcolor;
3330 } 3355 }
3331 UpdateTexture(tex); 3356 UpdateTexture(tex);
3357 TriggerScriptChangedEvent(Changed.COLOR);
3332 return; 3358 return;
3333 } 3359 }
3334 } 3360 }