From b4db3a550a5fbf3fc482f657f90840c109cf27d1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 4 Dec 2008 20:29:34 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=2750 with a small tweak. * Initializes ODE only when a scene is grabbed rather than on plugin load. This means we don't initialize ode if that physics engine is not used, and it allows other ode use plugins to be used instead. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 9da49f7..0dab05c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -59,7 +59,6 @@ namespace OpenSim.Region.Physics.OdePlugin public bool Init() { - d.InitODE(); return true; } @@ -67,6 +66,10 @@ namespace OpenSim.Region.Physics.OdePlugin { if (_mScene == null) { + // Initializing ODE only when a scene is created allows alternative ODE plugins to co-habit (according to + // http://opensimulator.org/mantis/view.php?id=2750). + d.InitODE(); + _mScene = new OdeScene(ode); } return (_mScene); @@ -260,7 +263,7 @@ namespace OpenSim.Region.Physics.OdePlugin /// These settings need to be tweaked 'exactly' right or weird stuff happens. /// public OdeScene(CollisionLocker dode) - { + { OdeLock = new Object(); ode = dode; nearCallback = near; -- cgit v1.1