Browse Source

More or less fixes #3

Thomas Buck 10 years ago
parent
commit
63fe667aba
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/SkeletalModel.cpp

+ 4
- 0
src/SkeletalModel.cpp View File

251
     } else {
251
     } else {
252
         for (; a < tr.getNumAnimsForMoveable(index); a++) {
252
         for (; a < tr.getNumAnimsForMoveable(index); a++) {
253
             animation.push_back(new AnimationFrame(tr, index, a, &frame_offset, frame_step));
253
             animation.push_back(new AnimationFrame(tr, index, a, &frame_offset, frame_step));
254
+
255
+            if (frame_offset > tr.NumFrames())
256
+                return;
257
+
254
             frame_offset = anim[a].frame_offset / 2;
258
             frame_offset = anim[a].frame_offset / 2;
255
             frame_step = anim[a].frame_size;
259
             frame_step = anim[a].frame_size;
256
         }
260
         }

Loading…
Cancel
Save