mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
fix zero frames texture animation fatal error
This commit is contained in:
parent
ac7e7a4c2f
commit
e9222976ef
1 changed files with 3 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ void TextureAnimator::update(float delta) {
|
|||
std::unordered_set<uint> changedTextures;
|
||||
|
||||
for (auto& elem : animations) {
|
||||
if (elem.frames.empty()) {
|
||||
continue;
|
||||
}
|
||||
elem.timer += delta;
|
||||
size_t frameNum = elem.currentFrame;
|
||||
Frame frame = elem.frames[elem.currentFrame];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue