diff options
author | Teravus Ovares | 2008-01-15 04:14:27 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-15 04:14:27 +0000 |
commit | 45e945616bfdab2ef57744670d3bb21acc1b3fcf (patch) | |
tree | c23956cef7294fc1f77062b41d63fdad3e19055e /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | * Mother of all commits: (diff) | |
download | opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.zip opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.gz opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.bz2 opensim-SC-45e945616bfdab2ef57744670d3bb21acc1b3fcf.tar.xz |
* Pass 2 of collidable (non physical) linksets
* Linkset status is now persistent
* Tweaked a physics child prim positioning hack to generate less database saves
* Re-factored physics object creation calls into ApplyPhysics. To create a new physics representation of an object or linkset, it's only necessary to call *group*.ApplyPhysics(bool m_physicalPrim). *lbsa has been waiting for this refactoring*
* We have collidable linksets now. (they don't become phantom anymore)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index ffc72c9..b591802 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -249,7 +249,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
249 | 249 | ||
250 | AttachToBackup(); | 250 | AttachToBackup(); |
251 | 251 | ||
252 | ApplyPhysics(); | 252 | ApplyPhysics(scene.m_physicalPrim); |
253 | 253 | ||
254 | ScheduleGroupForFullUpdate(); | 254 | ScheduleGroupForFullUpdate(); |
255 | } | 255 | } |
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
302 | 302 | ||
303 | AttachToBackup(); | 303 | AttachToBackup(); |
304 | 304 | ||
305 | ApplyPhysics(); | 305 | ApplyPhysics(scene.m_physicalPrim); |
306 | 306 | ||
307 | ScheduleGroupForFullUpdate(); | 307 | ScheduleGroupForFullUpdate(); |
308 | } | 308 | } |
@@ -426,7 +426,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
426 | 426 | ||
427 | AttachToBackup(); | 427 | AttachToBackup(); |
428 | 428 | ||
429 | ApplyPhysics(); | 429 | //ApplyPhysics(scene.m_physicalPrim); |
430 | } | 430 | } |
431 | 431 | ||
432 | /// <summary> | 432 | /// <summary> |
@@ -1577,6 +1577,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1577 | } | 1577 | } |
1578 | } | 1578 | } |
1579 | 1579 | ||
1580 | public void ResetChildPrimPhysicsPositions() | ||
1581 | { | ||
1582 | AbsolutePosition = AbsolutePosition; | ||
1583 | HasChanged = false; | ||
1584 | } | ||
1585 | |||
1580 | public LLUUID GetPartsFullID(uint localID) | 1586 | public LLUUID GetPartsFullID(uint localID) |
1581 | { | 1587 | { |
1582 | SceneObjectPart part = GetChildPart(localID); | 1588 | SceneObjectPart part = GetChildPart(localID); |
@@ -1649,18 +1655,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
1649 | Text = text; | 1655 | Text = text; |
1650 | } | 1656 | } |
1651 | 1657 | ||
1652 | public void ApplyPhysics() | 1658 | public void ApplyPhysics(bool m_physicalPrim) |
1653 | { | 1659 | { |
1654 | if (m_parts.Count > 1) | 1660 | if (m_parts.Count > 1) |
1655 | { | 1661 | { |
1656 | foreach (SceneObjectPart parts in m_parts.Values) | 1662 | foreach (SceneObjectPart parts in m_parts.Values) |
1657 | { | 1663 | { |
1658 | parts.ApplyPhysics(); | 1664 | parts.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); |
1665 | |||
1666 | // Hack to get the physics scene geometries in the right spot | ||
1667 | ResetChildPrimPhysicsPositions(); | ||
1668 | |||
1659 | } | 1669 | } |
1660 | } | 1670 | } |
1661 | else | 1671 | else |
1662 | { | 1672 | { |
1663 | m_rootPart.ApplyPhysics(); | 1673 | m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); |
1664 | } | 1674 | } |
1665 | } | 1675 | } |
1666 | } | 1676 | } |