From fd0a39df12b4d00d09b163027aa1ac824ebd043b Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 5 May 2014 16:19:33 -0700 Subject: [PATCH] Always update attachments. --- interface/src/avatar/Avatar.cpp | 7 ++----- interface/src/avatar/Avatar.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 3f670709ff..e3700b920b 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -126,7 +126,7 @@ void Avatar::simulate(float deltaTime) { _skeletonModel.simulate(deltaTime); } _skeletonModel.simulate(deltaTime, _hasNewJointRotations); - simulateAttachments(deltaTime, _hasNewJointRotations); + simulateAttachments(deltaTime); _hasNewJointRotations = false; glm::vec3 headPosition = _position; @@ -349,10 +349,7 @@ bool Avatar::shouldRenderHead(const glm::vec3& cameraPosition, RenderMode render return true; } -void Avatar::simulateAttachments(float deltaTime, bool fullUpdate) { - if (!fullUpdate) { - return; // only simulate if we have new data - } +void Avatar::simulateAttachments(float deltaTime) { for (int i = 0; i < _attachmentModels.size(); i++) { const AttachmentData& attachment = _attachmentData.at(i); Model* model = _attachmentModels.at(i); diff --git a/interface/src/avatar/Avatar.h b/interface/src/avatar/Avatar.h index 4b0bf85ea1..9828e120c1 100755 --- a/interface/src/avatar/Avatar.h +++ b/interface/src/avatar/Avatar.h @@ -190,7 +190,7 @@ protected: virtual void renderBody(RenderMode renderMode, float glowLevel = 0.0f); virtual bool shouldRenderHead(const glm::vec3& cameraPosition, RenderMode renderMode) const; - void simulateAttachments(float deltaTime, bool fullUpdate = true); + void simulateAttachments(float deltaTime); void renderAttachments(Model::RenderMode renderMode); virtual void updateJointMappings();