From 06f03f8eb497d71b847a907db92d7f210b2f79f1 Mon Sep 17 00:00:00 2001 From: Peter Schaefer Date: Mon, 20 Jun 2016 22:58:46 +0200 Subject: [PATCH] Boar position fixed --- Weave/Graphix/Model/IMetaMesh.cpp | 14 +++++++------- Weave/Scene/Boar.cpp | 6 +++--- Weave/Scene/Scene.cpp | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Weave/Graphix/Model/IMetaMesh.cpp b/Weave/Graphix/Model/IMetaMesh.cpp index 3702f57..dace6bb 100644 --- a/Weave/Graphix/Model/IMetaMesh.cpp +++ b/Weave/Graphix/Model/IMetaMesh.cpp @@ -202,13 +202,13 @@ void IMetaMesh::bt_init(bool _isConvex) { if (bt_collision_shape == nullptr) { - if (models.size() == 1) - { - auto tmp = models.front().first; - tmp->bt_init(_isConvex); - bt_collision_shape = *tmp; - } - else + //if (models.size() == 1) + //{ + // auto tmp = models.front().first; + // tmp->bt_init(_isConvex); + // bt_collision_shape = *tmp; + //} + //else { btCompoundShape* tmp_shape = new btCompoundShape(); btTransform tmpModelMatBT; diff --git a/Weave/Scene/Boar.cpp b/Weave/Scene/Boar.cpp index 60f6da7..e687c5d 100644 --- a/Weave/Scene/Boar.cpp +++ b/Weave/Scene/Boar.cpp @@ -39,8 +39,8 @@ void Boar::collides(SceneObject * _other, btPersistentManifold * _contactManifol if (pdist >= .0f) return; - Message::info("Spiel Verloren!->" + std::to_string(pdist)); - //Events::halt = true; - _other->movable = false; + Message::info("Spiel Verloren!->" + std::to_string(pdist)); + //Events::halt = true; + _other->movable = false; } diff --git a/Weave/Scene/Scene.cpp b/Weave/Scene/Scene.cpp index d932b04..533c229 100644 --- a/Weave/Scene/Scene.cpp +++ b/Weave/Scene/Scene.cpp @@ -296,13 +296,13 @@ void Scene::draw() const glDisable(GL_POLYGON_OFFSET_FILL); - /* Prepere DRAW SCENE */ + /* Prepare DRAW SCENE */ camera.useCamera(); render->useBuffer(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); dirLight->updateDirLightView(); Shader::getShader(SH_LIGHTING)->useShader(); fBufferObject::clearBuffer(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); shadowdir->getTexture()->useTexture(uPLightXP); -- 2.47.3