aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/ChOdePlugin
diff options
context:
space:
mode:
authorTom2011-07-15 12:08:40 -0700
committerTom2011-07-15 12:08:40 -0700
commitbb402d0d95c934fbcd8b1c03e228ec1d0a14f14d (patch)
treebb70496e535391fc04e6b7c8905cbd6864cd2eb0 /OpenSim/Region/Physics/ChOdePlugin
parentFix a raycast issue (diff)
downloadopensim-SC-bb402d0d95c934fbcd8b1c03e228ec1d0a14f14d.zip
opensim-SC-bb402d0d95c934fbcd8b1c03e228ec1d0a14f14d.tar.gz
opensim-SC-bb402d0d95c934fbcd8b1c03e228ec1d0a14f14d.tar.bz2
opensim-SC-bb402d0d95c934fbcd8b1c03e228ec1d0a14f14d.tar.xz
Add localid support to ch0de properly
Diffstat (limited to 'OpenSim/Region/Physics/ChOdePlugin')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs3
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs14
2 files changed, 6 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
index 7cd2dd1..82f1b94 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
@@ -256,8 +256,9 @@ namespace OpenSim.Region.Physics.OdePlugin
256 256
257 257
258 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, 258 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
259 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) 259 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode, uint localid)
260 { 260 {
261 m_localID = localid;
261 ode = dode; 262 ode = dode;
262 if (!pos.IsFinite()) 263 if (!pos.IsFinite())
263 { 264 {
diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
index a622745..353db44 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
@@ -1717,7 +1717,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1717 } 1717 }
1718 1718
1719 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation, 1719 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
1720 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical) 1720 IMesh mesh, PrimitiveBaseShape pbs, bool isphysical, uint localid)
1721 { 1721 {
1722 1722
1723 Vector3 pos = position; 1723 Vector3 pos = position;
@@ -1727,7 +1727,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1727 OdePrim newPrim; 1727 OdePrim newPrim;
1728 lock (OdeLock) 1728 lock (OdeLock)
1729 { 1729 {
1730 newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode); 1730 newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode, localid);
1731 1731
1732 lock (_prims) 1732 lock (_prims)
1733 _prims.Add(newPrim); 1733 _prims.Add(newPrim);
@@ -1749,13 +1749,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1749 } 1749 }
1750 1750
1751 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 1751 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1752 Vector3 size, Quaternion rotation) //To be removed 1752 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
1753 {
1754 return AddPrimShape(primName, pbs, position, size, rotation, false);
1755 }
1756
1757 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1758 Vector3 size, Quaternion rotation, bool isPhysical)
1759 { 1753 {
1760 PhysicsActor result; 1754 PhysicsActor result;
1761 IMesh mesh = null; 1755 IMesh mesh = null;
@@ -1763,7 +1757,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1763 if (needsMeshing(pbs)) 1757 if (needsMeshing(pbs))
1764 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); 1758 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1765 1759
1766 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); 1760 result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, localid);
1767 1761
1768 return result; 1762 return result;
1769 } 1763 }