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')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp6
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h2
-rw-r--r--source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h5
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h2
4 files changed, 13 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index b6a46b4307e..dcd30ea1174 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -1871,8 +1871,12 @@ btDispatcher* CcdPhysicsEnvironment::GetDispatcher()
return m_dynamicsWorld->getDispatcher();
}
-void CcdPhysicsEnvironment::MergeEnvironment(CcdPhysicsEnvironment *other)
+void CcdPhysicsEnvironment::MergeEnvironment(PHY_IPhysicsEnvironment *other_env)
{
+ CcdPhysicsEnvironment *other = dynamic_cast<CcdPhysicsEnvironment*>(other_env);
+ printf("KX_Scene::MergeScene: Other scene is not using Bullet physics, not merging physics.\n");
+ return;
+
std::set<CcdPhysicsController*>::iterator it;
while (other->m_controllers.begin() != other->m_controllers.end())
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
index 0e8ac9417f0..4e002f5ce3c 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
@@ -258,7 +258,7 @@ protected:
class btConstraintSolver* GetConstraintSolver();
- void MergeEnvironment(CcdPhysicsEnvironment *other);
+ void MergeEnvironment(PHY_IPhysicsEnvironment *other_env);
protected:
diff --git a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
index 41462f91840..c06a8d904b2 100644
--- a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
+++ b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
@@ -103,6 +103,11 @@ public:
return 0.f;
}
+ virtual void MergeEnvironment(PHY_IPhysicsEnvironment *other_env)
+ {
+ // Dummy, nothing to do here
+ }
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:DummyPhysicsEnvironment")
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
index b1a0480ab14..d2574b3ca3b 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
@@ -188,6 +188,8 @@ class PHY_IPhysicsEnvironment
virtual void ExportFile(const char* filename) {};
+ virtual void MergeEnvironment(PHY_IPhysicsEnvironment *other_env) = 0;
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GE:PHY_IPhysicsEnvironment")