Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Physics/Bullet')
-rw-r--r--source/gameengine/Physics/Bullet/CMakeLists.txt34
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/SConscript8
4 files changed, 29 insertions, 21 deletions
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index da885122a4f..7b7fb508ebd 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -27,23 +27,23 @@
SET(SRC CcdPhysicsEnvironment.cpp CcdPhysicsController.cpp CcdGraphicController.cpp)
SET(INC
- .
- ../common
- ../../../../extern/bullet2/src
- ../../../../extern/glew/include
- ../../../../intern/moto/include
- ../../../../intern/guardedalloc
- ../../../kernel/gen_system
- ../../../../intern/string
- ../../Rasterizer
- ../../Ketsji
- ../../Expressions
- ../../GameLogic
- ../../SceneGraph
- ../../../../source/blender/makesdna
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
- ${PYTHON_INC}
+ .
+ ../common
+ ../../../../extern/bullet2/src
+ ../../../../extern/glew/include
+ ../../../../intern/moto/include
+ ../../../../intern/guardedalloc
+ ../../../kernel/gen_system
+ ../../../../intern/string
+ ../../Rasterizer
+ ../../Ketsji
+ ../../Expressions
+ ../../GameLogic
+ ../../SceneGraph
+ ../../../../source/blender/makesdna
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenkernel
+ ${PYTHON_INC}
)
BLENDERLIB(bf_bullet "${SRC}" "${INC}")
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index df8dc3560ac..20e830c9dc3 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -1073,7 +1073,7 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
//workaround for incompatibility between 'DYNAMIC' game object, and angular factor
//a DYNAMIC object has some inconsistency: it has no angular effect due to collisions, but still has torque
const btVector3& angFac = body->getAngularFactor();
- btVector3 tmpFac(1,1,1);
+ btVector3 tmpFac(0,0,1);
body->setAngularFactor(tmpFac);
body->applyTorque(torque);
body->setAngularFactor(angFac);
@@ -1829,6 +1829,8 @@ bool CcdShapeConstructionInfo::UpdateMesh(class KX_GameObject* gameobj, class RA
}
for(mf= mface, i=0; i < numpolys; mf++, i++) {
+ unsigned int *fv = &mf->v1;
+
if(mf->v4) {
fv_pt= quad_verts;
*poly_index_pt++ = *poly_index_pt++ = index[i];
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index bf28802870a..bc7ccacc39b 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -327,6 +327,7 @@ CcdPhysicsEnvironment::CcdPhysicsEnvironment(bool useDbvtCulling,btDispatcher* d
:m_cullingCache(NULL),
m_cullingTree(NULL),
m_numIterations(10),
+m_scalingPropagated(false),
m_numTimeSubSteps(1),
m_ccdMode(0),
m_solverType(-1),
@@ -335,8 +336,7 @@ m_enableSatCollisionDetection(false),
m_solver(NULL),
m_ownPairCache(NULL),
m_filterCallback(NULL),
-m_ownDispatcher(NULL),
-m_scalingPropagated(false)
+m_ownDispatcher(NULL)
{
for (int i=0;i<PHY_NUM_RESPONSE;i++)
diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript
index 49f2af1b001..44b75402630 100644
--- a/source/gameengine/Physics/Bullet/SConscript
+++ b/source/gameengine/Physics/Bullet/SConscript
@@ -21,4 +21,10 @@ incs += ' #intern/guardedalloc'
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=cxxflags )