aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-02 09:31:39 +0000
committerTeravus Ovares2008-03-02 09:31:39 +0000
commit0a5c48b1c820d0899ffb130c9bf0a59b04bc9099 (patch)
tree9f10684320a6808503ef211d3eeda7fbac5cf086 /OpenSim/Region/Environment
parentRename handler020 through handler029 with more (diff)
downloadopensim-SC_OLD-0a5c48b1c820d0899ffb130c9bf0a59b04bc9099.zip
opensim-SC_OLD-0a5c48b1c820d0899ffb130c9bf0a59b04bc9099.tar.gz
opensim-SC_OLD-0a5c48b1c820d0899ffb130c9bf0a59b04bc9099.tar.bz2
opensim-SC_OLD-0a5c48b1c820d0899ffb130c9bf0a59b04bc9099.tar.xz
* This is a very icky implementation of physical linkset prim using fixed joints. This will change quite drastically, however it's fun to play with.
* To play with this you must link your prim before setting it physical, otherwise they won't link in the physics engine properly. This will also be fixed. * Currently the linked prim are extremely unstable because I have yet to implement combining of forces with the same normal. This will also be fixed. In fact, the whole PhysicsActor, ODEPrim relationship will be reworked to consider groups from the get-go. * This implementation is better then it crashing your sim, so I'm commiting it for now.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs11
3 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f6e3d82..a20e466 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -120,8 +120,8 @@ namespace OpenSim.Region.Environment.Scenes
120 120
121 private int m_update_physics = 1; 121 private int m_update_physics = 1;
122 private int m_update_entitymovement = 1; 122 private int m_update_entitymovement = 1;
123 private int m_update_entities = 20; // Run through all objects checking for updates 123 private int m_update_entities = 1; // Run through all objects checking for updates
124 private int m_update_entitiesquick = 1; // Run through objects that have scheduled updates checking for updates 124 private int m_update_entitiesquick = 200; // Run through objects that have scheduled updates checking for updates
125 private int m_update_presences = 1; // Update scene presence movements 125 private int m_update_presences = 1; // Update scene presence movements
126 private int m_update_events = 1; 126 private int m_update_events = 1;
127 private int m_update_backup = 200; 127 private int m_update_backup = 200;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 801e614..713c3ba 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1758,10 +1758,13 @@ namespace OpenSim.Region.Environment.Scenes
1758 { 1758 {
1759 lock (m_parts) 1759 lock (m_parts)
1760 { 1760 {
1761 m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim);
1761 foreach (SceneObjectPart part in m_parts.Values) 1762 foreach (SceneObjectPart part in m_parts.Values)
1762 { 1763 {
1763 part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); 1764 if (part.LocalID != m_rootPart.LocalID)
1764 1765 {
1766 part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim);
1767 }
1765 // Hack to get the physics scene geometries in the right spot 1768 // Hack to get the physics scene geometries in the right spot
1766 ResetChildPrimPhysicsPositions(); 1769 ResetChildPrimPhysicsPositions();
1767 1770
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 6da4c3e..04fa03e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1306,9 +1306,12 @@ namespace OpenSim.Region.Environment.Scenes
1306 1306
1307 PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; 1307 PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate;
1308 PhysActor.OnOutOfBounds -= PhysicsOutOfBounds; 1308 PhysActor.OnOutOfBounds -= PhysicsOutOfBounds;
1309 PhysActor.delink();
1309 } 1310 }
1310 1311
1311 PhysActor.IsPhysical = UsePhysics; 1312 PhysActor.IsPhysical = UsePhysics;
1313
1314
1312 // If we're not what we're supposed to be in the physics scene, recreate ourselves. 1315 // If we're not what we're supposed to be in the physics scene, recreate ourselves.
1313 //m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); 1316 //m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor);
1314 /// that's not wholesome. Had to make Scene public 1317 /// that's not wholesome. Had to make Scene public
@@ -1331,6 +1334,14 @@ namespace OpenSim.Region.Environment.Scenes
1331 1334
1332 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1335 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1333 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1336 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1337 if (ParentID != 0 && ParentID != LocalID)
1338 {
1339 if (ParentGroup.RootPart.PhysActor != null)
1340 {
1341 PhysActor.link(ParentGroup.RootPart.PhysActor);
1342 }
1343 }
1344
1334 } 1345 }
1335 } 1346 }
1336 } 1347 }