mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 21:55:25 +02:00
fix one more case of animaiton stutter
This commit is contained in:
parent
860098585c
commit
86a9d5719b
1 changed files with 1 additions and 5 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "EntityTreeElement.h"
|
||||
#include "ModelEntityItem.h"
|
||||
|
||||
|
||||
const QString ModelEntityItem::DEFAULT_MODEL_URL = QString("");
|
||||
const QString ModelEntityItem::DEFAULT_ANIMATION_URL = QString("");
|
||||
const float ModelEntityItem::DEFAULT_ANIMATION_FRAME_INDEX = 0.0f;
|
||||
|
@ -33,7 +32,7 @@ EntityItem* ModelEntityItem::factory(const EntityItemID& entityID, const EntityI
|
|||
ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID, const EntityItemProperties& properties) :
|
||||
EntityItem(entityItemID, properties)
|
||||
{
|
||||
_type = EntityTypes::Model;
|
||||
_type = EntityTypes::Model;
|
||||
setProperties(properties);
|
||||
_lastAnimated = usecTimestampNow();
|
||||
_jointMappingCompleted = false;
|
||||
|
@ -343,9 +342,6 @@ QVector<glm::quat> ModelEntityItem::getAnimationFrame() {
|
|||
Animation* myAnimation = getAnimation(_animationURL);
|
||||
QVector<FBXAnimationFrame> frames = myAnimation->getFrames();
|
||||
int frameCount = frames.size();
|
||||
if (_animationLoop.getMaxFrameIndexHint() != frameCount) {
|
||||
_animationLoop.setMaxFrameIndexHint(frameCount);
|
||||
}
|
||||
if (frameCount > 0) {
|
||||
int animationFrameIndex = (int)(glm::floor(getAnimationFrameIndex())) % frameCount;
|
||||
if (animationFrameIndex < 0 || animationFrameIndex > frameCount) {
|
||||
|
|
Loading…
Reference in a new issue