From d4faf69beb9536bacb62de23b1d3012447c7e85e Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 8 Sep 2016 15:42:42 -0700 Subject: [PATCH] don't cripple interface with log-spam --- libraries/physics/src/EntityMotionState.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/physics/src/EntityMotionState.cpp b/libraries/physics/src/EntityMotionState.cpp index b70927d501..951728c4da 100644 --- a/libraries/physics/src/EntityMotionState.cpp +++ b/libraries/physics/src/EntityMotionState.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "BulletUtil.h" #include "EntityMotionState.h" @@ -230,11 +231,17 @@ void EntityMotionState::setWorldTransform(const btTransform& worldTrans) { bool positionSuccess; _entity->setPosition(bulletToGLM(worldTrans.getOrigin()) + ObjectMotionState::getWorldOffset(), positionSuccess, false); if (!positionSuccess) { + static QString repeatedMessage = + LogHandler::getInstance().addRepeatedMessageRegex("EntityMotionState::setWorldTransform " + "setPosition failed.*"); qDebug() << "EntityMotionState::setWorldTransform setPosition failed" << _entity->getID(); } bool orientationSuccess; _entity->setOrientation(bulletToGLM(worldTrans.getRotation()), orientationSuccess, false); if (!orientationSuccess) { + static QString repeatedMessage = + LogHandler::getInstance().addRepeatedMessageRegex("EntityMotionState::setWorldTransform " + "setOrientation failed.*"); qDebug() << "EntityMotionState::setWorldTransform setOrientation failed" << _entity->getID(); } _entity->setVelocity(getBodyLinearVelocity());