From: LockedLunatic Date: Fri, 24 Jun 2016 00:00:09 +0000 (+0200) Subject: Hebel gefixed X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=dc5bd455f7b2e0afa0a15e7a8b6f12bffd4d395a;p=cgue_weave.git Hebel gefixed --- diff --git a/Weave/Scene/EventBox.cpp b/Weave/Scene/EventBox.cpp index f83369b..3048331 100644 --- a/Weave/Scene/EventBox.cpp +++ b/Weave/Scene/EventBox.cpp @@ -98,7 +98,6 @@ void EventBox::collides(SceneObject* _other, btPersistentManifold* _contactManif Events::halt = true; break; case EB_LEVER: - Message::info("Sesam öffne dich!"); ((Lever*)_other)->trigger(); break; } diff --git a/Weave/Scene/Lever.cpp b/Weave/Scene/Lever.cpp index 670545f..8588c21 100644 --- a/Weave/Scene/Lever.cpp +++ b/Weave/Scene/Lever.cpp @@ -4,6 +4,7 @@ Lever::Lever(const mat4& _modelMat, const vec4& _material, string _modelpath, string texturepath) : SceneObject(_modelMat, _material, _modelpath, texturepath) { + turned = false; recipient = nullptr; collide_group = COL_LEVER; collide_with = COL_EVENT; @@ -29,11 +30,15 @@ void Lever::trigger() { this->startanimation((uint)0, 1.0f); recipient->startanimation((uint)0, 1.0f); + + Message::info("Sesam öffne dich!"); } else { this->startanimation((uint)0, -1.0f); recipient->startanimation((uint)0, -1.0f); + + Message::info("Sesam schließe dich!"); } }