diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 62 |
1 files changed, 43 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0c35eec..cf718cb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -150,8 +150,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
150 | // TODO: This needs to be persisted in next XML version update! | 150 | // TODO: This needs to be persisted in next XML version update! |
151 | [XmlIgnore] | 151 | [XmlIgnore] |
152 | public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; | 152 | public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; |
153 | |||
153 | [XmlIgnore] | 154 | [XmlIgnore] |
154 | public PhysicsActor PhysActor; | 155 | public PhysicsActor PhysActor |
156 | { | ||
157 | get { return m_physActor; } | ||
158 | set | ||
159 | { | ||
160 | // m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID); | ||
161 | m_physActor = value; | ||
162 | } | ||
163 | } | ||
155 | 164 | ||
156 | //Xantor 20080528 Sound stuff: | 165 | //Xantor 20080528 Sound stuff: |
157 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. | 166 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. |
@@ -297,6 +306,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
297 | /// </summary> | 306 | /// </summary> |
298 | private byte m_updateFlag; | 307 | private byte m_updateFlag; |
299 | 308 | ||
309 | private PhysicsActor m_physActor; | ||
300 | protected Vector3 m_acceleration; | 310 | protected Vector3 m_acceleration; |
301 | protected Vector3 m_angularVelocity; | 311 | protected Vector3 m_angularVelocity; |
302 | 312 | ||
@@ -396,7 +406,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
396 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from | 406 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from |
397 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log | 407 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log |
398 | 408 | ||
399 | _flags = 0; | 409 | Flags = 0; |
400 | CreateSelected = true; | 410 | CreateSelected = true; |
401 | 411 | ||
402 | TrimPermissions(); | 412 | TrimPermissions(); |
@@ -424,7 +434,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
424 | private uint _groupMask = (uint)PermissionMask.None; | 434 | private uint _groupMask = (uint)PermissionMask.None; |
425 | private uint _everyoneMask = (uint)PermissionMask.None; | 435 | private uint _everyoneMask = (uint)PermissionMask.None; |
426 | private uint _nextOwnerMask = (uint)PermissionMask.All; | 436 | private uint _nextOwnerMask = (uint)PermissionMask.All; |
427 | private PrimFlags _flags = 0; | 437 | private PrimFlags _flags = PrimFlags.None; |
428 | private DateTime m_expires; | 438 | private DateTime m_expires; |
429 | private DateTime m_rezzed; | 439 | private DateTime m_rezzed; |
430 | private bool m_createSelected = false; | 440 | private bool m_createSelected = false; |
@@ -471,10 +481,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
471 | set { m_inventory.Items = value; } | 481 | set { m_inventory.Items = value; } |
472 | } | 482 | } |
473 | 483 | ||
484 | /// <summary> | ||
485 | /// This is idential to the Flags property, except that the returned value is uint rather than PrimFlags | ||
486 | /// </summary> | ||
487 | [Obsolete("Use Flags property instead")] | ||
474 | public uint ObjectFlags | 488 | public uint ObjectFlags |
475 | { | 489 | { |
476 | get { return (uint)_flags; } | 490 | get { return (uint)Flags; } |
477 | set { _flags = (PrimFlags)value; } | 491 | set { Flags = (PrimFlags)value; } |
478 | } | 492 | } |
479 | 493 | ||
480 | public UUID UUID | 494 | public UUID UUID |
@@ -1002,7 +1016,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1002 | public bool CreateSelected | 1016 | public bool CreateSelected |
1003 | { | 1017 | { |
1004 | get { return m_createSelected; } | 1018 | get { return m_createSelected; } |
1005 | set { m_createSelected = value; } | 1019 | set |
1020 | { | ||
1021 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); | ||
1022 | m_createSelected = value; | ||
1023 | } | ||
1006 | } | 1024 | } |
1007 | 1025 | ||
1008 | #endregion | 1026 | #endregion |
@@ -1169,7 +1187,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1169 | public PrimFlags Flags | 1187 | public PrimFlags Flags |
1170 | { | 1188 | { |
1171 | get { return _flags; } | 1189 | get { return _flags; } |
1172 | set { _flags = value; } | 1190 | set |
1191 | { | ||
1192 | // m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); | ||
1193 | _flags = value; | ||
1194 | } | ||
1173 | } | 1195 | } |
1174 | 1196 | ||
1175 | [XmlIgnore] | 1197 | [XmlIgnore] |
@@ -1305,7 +1327,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1305 | if ((ObjectFlags & (uint) flag) == 0) | 1327 | if ((ObjectFlags & (uint) flag) == 0) |
1306 | { | 1328 | { |
1307 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); | 1329 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); |
1308 | _flags |= flag; | 1330 | Flags |= flag; |
1309 | 1331 | ||
1310 | if (flag == PrimFlags.TemporaryOnRez) | 1332 | if (flag == PrimFlags.TemporaryOnRez) |
1311 | ResetExpire(); | 1333 | ResetExpire(); |
@@ -1523,7 +1545,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1523 | } | 1545 | } |
1524 | else | 1546 | else |
1525 | { | 1547 | { |
1526 | m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); | 1548 | m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); |
1527 | } | 1549 | } |
1528 | } | 1550 | } |
1529 | } | 1551 | } |
@@ -1793,7 +1815,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1793 | /// that's not wholesome. Had to make Scene public | 1815 | /// that's not wholesome. Had to make Scene public |
1794 | //PhysActor = null; | 1816 | //PhysActor = null; |
1795 | 1817 | ||
1796 | if ((ObjectFlags & (uint)PrimFlags.Phantom) == 0) | 1818 | if ((Flags & PrimFlags.Phantom) == 0) |
1797 | { | 1819 | { |
1798 | if (UsePhysics) | 1820 | if (UsePhysics) |
1799 | { | 1821 | { |
@@ -1940,12 +1962,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1940 | } | 1962 | } |
1941 | 1963 | ||
1942 | public uint GetEffectiveObjectFlags() | 1964 | public uint GetEffectiveObjectFlags() |
1943 | { | 1965 | { |
1944 | PrimFlags f = _flags; | 1966 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by |
1945 | if (m_parentGroup == null || m_parentGroup.RootPart == this) | 1967 | // value rather than reference |
1946 | f &= ~(PrimFlags.Touch | PrimFlags.Money); | 1968 | // PrimFlags f = _flags; |
1969 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) | ||
1970 | // f &= ~(PrimFlags.Touch | PrimFlags.Money); | ||
1947 | 1971 | ||
1948 | return (uint)_flags | (uint)LocalFlags; | 1972 | return (uint)Flags | (uint)LocalFlags; |
1949 | } | 1973 | } |
1950 | 1974 | ||
1951 | public Vector3 GetGeometricCenter() | 1975 | public Vector3 GetGeometricCenter() |
@@ -2696,10 +2720,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2696 | public void RemFlag(PrimFlags flag) | 2720 | public void RemFlag(PrimFlags flag) |
2697 | { | 2721 | { |
2698 | // PrimFlags prevflag = Flags; | 2722 | // PrimFlags prevflag = Flags; |
2699 | if ((ObjectFlags & (uint) flag) != 0) | 2723 | if ((Flags & flag) != 0) |
2700 | { | 2724 | { |
2701 | //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); | 2725 | //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); |
2702 | _flags &= ~flag; | 2726 | Flags &= ~flag; |
2703 | } | 2727 | } |
2704 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); | 2728 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); |
2705 | //ScheduleFullUpdate(); | 2729 | //ScheduleFullUpdate(); |
@@ -2990,10 +3014,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2990 | 3014 | ||
2991 | if (remoteClient.AgentId == _ownerID) | 3015 | if (remoteClient.AgentId == _ownerID) |
2992 | { | 3016 | { |
2993 | if ((uint) (_flags & PrimFlags.CreateSelected) != 0) | 3017 | if ((Flags & PrimFlags.CreateSelected) != 0) |
2994 | { | 3018 | { |
2995 | clientFlags |= (uint) PrimFlags.CreateSelected; | 3019 | clientFlags |= (uint) PrimFlags.CreateSelected; |
2996 | _flags &= ~PrimFlags.CreateSelected; | 3020 | Flags &= ~PrimFlags.CreateSelected; |
2997 | } | 3021 | } |
2998 | } | 3022 | } |
2999 | //bool isattachment = IsAttachment; | 3023 | //bool isattachment = IsAttachment; |