From abacfba287efe89ead9bff529d62f65a253eceb8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 14 Mar 2008 05:22:52 +0000 Subject: * Preliminary work with the ODEPlugin to collect collision data. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 3 +++ OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 3 ++- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 1 + OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1f4cdd5..041dc4e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -545,6 +545,9 @@ namespace OpenSim.Region.Environment.Scenes new Quaternion(dupe.RootPart.RotationOffset.W, dupe.RootPart.RotationOffset.X, dupe.RootPart.RotationOffset.Y, dupe.RootPart.RotationOffset.Z), dupe.RootPart.PhysActor.IsPhysical); + + dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; + dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); } // Now we've made a copy that replaces this one, we need to diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index b708d04..ffb9d36 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -785,7 +785,7 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(Scale.X, Scale.Y, Scale.Z), new Quaternion(RotationOffset.W, RotationOffset.X, RotationOffset.Y, RotationOffset.Z), RigidBody); - + PhysActor.LocalID = LocalId; DoPhysicsPropertyUpdate(RigidBody, true); } @@ -1305,6 +1305,7 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(Scale.X, Scale.Y, Scale.Z), new Quaternion(RotationOffset.W, RotationOffset.X, RotationOffset.Y, RotationOffset.Z), usePhysics); + PhysActor.LocalID = LocalId; DoPhysicsPropertyUpdate(usePhysics, true); } else diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 2f35fe3..1731cd9 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1809,6 +1809,7 @@ namespace OpenSim.Region.Environment.Scenes } //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; + m_physicsActor.LocalID = LocalId; } // Event called by the physics plugin to tell the avatar about a collision. diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index 2b05bb6..8666862 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs @@ -90,6 +90,7 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); + rootPart.PhysActor.LocalID = rootPart.LocalId; rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); } primCount++; @@ -192,6 +193,9 @@ namespace OpenSim.Region.Environment.Scenes new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); + + rootPart.PhysActor.LocalID = rootPart.LocalId; + rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); rootPart.Velocity = receivedVelocity; } -- cgit v1.1