From eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 14 Oct 2012 19:23:35 -0700 Subject: BulletSim: Fix small problems with last patch: BSScene.World properly initialized and setting of C++ parameters commented out. Comments and logging added. --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 5158011..7998b08 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -261,10 +261,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters m_maxUpdatesPerFrame, m_updateArrayPinnedHandle.AddrOfPinnedObject(), m_DebugLogCallbackHandle)); - // Initialization to support the transition to a new API which puts most of the logic - // into the C# code so it is easier to modify and add to. - World = new BulletSim(WorldID, this, BulletSimAPI.GetSimHandle2(WorldID)); - Constraints = new BSConstraintCollection(World); TerrainManager = new BSTerrainManager(this); @@ -1251,10 +1247,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters case PhysParameterEntry.APPLY_TO_NONE: defaultLoc = val; // setting only the default value break; - case PhysParameterEntry.APPLY_TO_ALL: - m_log.ErrorFormat("{0} Cannot change parameters of multiple objects. Someday it will be added.", LogHeader); - /* + case PhysParameterEntry.APPLY_TO_ALL: defaultLoc = val; // setting ALL also sets the default value + /* List objectIDs = lIDs; string xparm = parm.ToLower(); float xval = val; @@ -1276,15 +1271,15 @@ public class BSScene : PhysicsScene, IPhysicsParameters // schedule the actual updating of the paramter to when the phys engine is not busy protected void TaintedUpdateParameter(string parm, uint localID, float val) { + /* Settings in the C++ code are not working at the moment. TODO: fix the settings. m_log.ErrorFormat("{0} Cannot change parameters of base objects. Someday it will be added.", LogHeader); - /* uint xlocalID = localID; string xparm = parm.ToLower(); float xval = val; TaintedObject("BSScene.TaintedUpdateParameter", delegate() { BulletSimAPI.UpdateParameter(WorldID, xlocalID, xparm, xval); }); - */ + */ } // Get parameter. -- cgit v1.1