mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 21:45:15 +02:00
now the update frame is only happening in the assignment client code. added setCurrentlyPlayingFrame to ModelEntityItem.cpp
This commit is contained in:
parent
013d16cee9
commit
befa0f8ab5
3 changed files with 11 additions and 1 deletions
|
@ -309,7 +309,8 @@ void EntityTreeRenderer::update(bool simulate) {
|
|||
PerformanceTimer perfTimer("ETRupdate");
|
||||
if (_tree && !_shuttingDown) {
|
||||
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
|
||||
tree->update(simulate);
|
||||
//angus
|
||||
//tree->update(simulate);
|
||||
|
||||
// Update the rendereable entities as needed
|
||||
{
|
||||
|
|
|
@ -254,6 +254,7 @@ void ModelEntityItem::updateFrameCount() {
|
|||
float deltaTime = (float)interval / (float)USECS_PER_SECOND;
|
||||
_currentlyPlayingFrame += (deltaTime * _previousAnimationProperties.getFPS());
|
||||
qCDebug(entities) << "the frame is now " << _currentlyPlayingFrame;
|
||||
setAnimationCurrentlyPlayingFrame(_currentlyPlayingFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -609,6 +610,12 @@ void ModelEntityItem::setAnimationCurrentFrame(float value) {
|
|||
});
|
||||
}
|
||||
|
||||
void ModelEntityItem::setAnimationCurrentlyPlayingFrame(float value) {
|
||||
withWriteLock([&] {
|
||||
_animationProperties.setCurrentlyPlayingFrame(value);
|
||||
});
|
||||
}
|
||||
|
||||
void ModelEntityItem::setAnimationLoop(bool loop) {
|
||||
withWriteLock([&] {
|
||||
_animationProperties.setLoop(loop);
|
||||
|
@ -669,6 +676,7 @@ float ModelEntityItem::getAnimationCurrentFrame() const {
|
|||
return _animationProperties.getCurrentFrame();
|
||||
});
|
||||
}
|
||||
|
||||
//angus change
|
||||
bool ModelEntityItem::isAnimatingSomething() const {
|
||||
return resultWithReadLock<bool>([&] {
|
||||
|
|
|
@ -87,6 +87,7 @@ public:
|
|||
void setAnimationURL(const QString& url);
|
||||
|
||||
void setAnimationCurrentFrame(float value);
|
||||
void setAnimationCurrentlyPlayingFrame(float value);
|
||||
void setAnimationIsPlaying(bool value);
|
||||
void setAnimationFPS(float value);
|
||||
|
||||
|
|
Loading…
Reference in a new issue