mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 04:44:08 +02:00
Got rid of the while loop in updateFrameCount in ModelEntityItem_cpp
This commit is contained in:
parent
29538851b6
commit
079d9639e4
1 changed files with 1 additions and 4 deletions
|
@ -287,10 +287,7 @@ void ModelEntityItem::updateFrameCount() {
|
|||
_currentFrame += (deltaTime * getAnimationFPS());
|
||||
if (_currentFrame > getAnimationLastFrame()) {
|
||||
if (getAnimationLoop()) {
|
||||
//_currentFrame = getAnimationFirstFrame() + (int)(glm::floor(_currentFrame - getAnimationFirstFrame())) % (updatedFrameCount - 1);
|
||||
while (_currentFrame > (getAnimationFirstFrame() + (updatedFrameCount - 1))) {
|
||||
_currentFrame = _currentFrame - (updatedFrameCount - 1);
|
||||
}
|
||||
_currentFrame = getAnimationFirstFrame() + (int)(glm::floor(_currentFrame - getAnimationFirstFrame())) % (updatedFrameCount - 1);
|
||||
} else {
|
||||
_currentFrame = getAnimationLastFrame();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue