Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp	(revision 2908)
@@ -136,7 +136,4 @@
 			//btScalar clippedDist  = dist;
 			
-			//don't report time of impact for motion away from the contact normal (or causes minor penetration)
-			if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=SIMD_EPSILON)
-				return false;
 			
 			dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity);
@@ -200,8 +197,9 @@
 
 		}
-	
+
+		//don't report time of impact for motion away from the contact normal (or causes minor penetration)
 		if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=result.m_allowedPenetration)//SIMD_EPSILON)
 			return false;
-			
+
 		result.m_fraction = lambda;
 		result.m_normal = n;
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp	(revision 2908)
@@ -151,6 +151,5 @@
 			if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared)) 
 			{
-				checkSimplex=true;
-				//checkPenetration = false;
+				checkPenetration = false;
 				break;
 			}
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h	(revision 2908)
@@ -113,10 +113,4 @@
 			}
 			
-			///this returns the most recent applied impulse, to satisfy contact constraints by the constraint solver
-			btScalar	getAppliedImpulse() const
-			{
-				return m_appliedImpulse;
-			}
-
 			
 
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp	(revision 2908)
@@ -184,7 +184,4 @@
 		
 	}
-	if (insertIndex<0)
-		insertIndex=0;
-
 	btAssert(m_pointCache[insertIndex].m_userPersistentData==0);
 	m_pointCache[insertIndex] = newPoint;
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h	(revision 2908)
@@ -56,5 +56,4 @@
 
 	btScalar	m_contactBreakingThreshold;
-	btScalar	m_contactProcessingThreshold;
 
 	
@@ -72,8 +71,7 @@
 	btPersistentManifold();
 
-	btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold,btScalar contactProcessingThreshold)
+	btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold)
 		: m_body0(body0),m_body1(body1),m_cachedPoints(0),
-		m_contactBreakingThreshold(contactBreakingThreshold),
-		m_contactProcessingThreshold(contactProcessingThreshold)
+		m_contactBreakingThreshold(contactBreakingThreshold)
 	{
 		
@@ -114,9 +112,4 @@
 	///@todo: get this margin from the current physics / collision environment
 	btScalar	getContactBreakingThreshold() const;
-
-	btScalar	getContactProcessingThreshold() const
-	{
-		return m_contactProcessingThreshold;
-	}
 	
 	int getCacheEntry(const btManifoldPoint& newPoint) const;
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp	(revision 2908)
@@ -24,10 +24,8 @@
 #include "btRaycastCallback.h"
 
-btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags)
+btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to)
 	:
 	m_from(from),
 	m_to(to),
-   //@BP Mod
-   m_flags(flags),
 	m_hitFraction(btScalar(1.))
 {
@@ -58,10 +56,4 @@
 		return ; // same sign
 	}
-   //@BP Mod - Backface filtering
-   if (((m_flags & kF_FilterBackfaces) != 0) && (dist_a > btScalar(0.0)))
-   {
-      // Backface, skip check
-      return;
-   }
 	
 	const btScalar proj_length=dist_a-dist_b;
@@ -98,16 +90,12 @@
 					if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance) 
 					{
-                  //@BP Mod
-                  // Triangle normal isn't normalized
-				      triangleNormal.normalize();
 
-                  //@BP Mod - Allow for unflipped normal when raycasting against backfaces
-                  if (((m_flags & kF_KeepUnflippedNormal) != 0) || (dist_a <= btScalar(0.0)))
+						if ( dist_a > 0 )
 						{
-							m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex);
+							m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex);
 						}
 						else
 						{
-                     m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex);
+							m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex);
 						}
 					}
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h	(revision 2908)
@@ -30,18 +30,7 @@
 	btVector3 m_to;
 
-   //@BP Mod - allow backface filtering and unflipped normals
-   enum EFlags
-   {
-      kF_None                 = 0,
-      kF_FilterBackfaces      = 1 << 0,
-      kF_KeepUnflippedNormal  = 1 << 1,   // Prevents returned face normal getting flipped when a ray hits a back-facing triangle
-
-      kF_Terminator        = 0xFFFFFFFF
-   };
-   unsigned int m_flags;
-
 	btScalar	m_hitFraction;
 
-	btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags=0);
+	btTriangleRaycastCallback(const btVector3& from,const btVector3& to);
 	
 	virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
Index: code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
===================================================================
--- code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp	(revision 2907)
+++ code/branches/questsystem5/src/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp	(revision 2908)
@@ -26,4 +26,6 @@
 
 #include "btVoronoiSimplexSolver.h"
+#include <assert.h>
+//#include <stdio.h>
 
 #define VERTA  0
@@ -36,5 +38,5 @@
 {
 	
-	btAssert(m_numVertices>0);
+	assert(m_numVertices>0);
 	m_numVertices--;
 	m_simplexVectorW[index] = m_simplexVectorW[m_numVertices];
