mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Throw error in PSA converter if animation has no frames, as this will lead to a divide-by-zero error in the engine, and it's good to catch that as early as possible.
This was SVN commit r11009.
This commit is contained in:
@@ -84,6 +84,7 @@ public:
|
|||||||
|
|
||||||
// Count frames; don't include the last keyframe
|
// Count frames; don't include the last keyframe
|
||||||
size_t frameCount = (size_t)((timeEnd - timeStart) / frameLength - 0.5f);
|
size_t frameCount = (size_t)((timeEnd - timeStart) / frameLength - 0.5f);
|
||||||
|
REQUIRE(frameCount > 0, "animation must have frames");
|
||||||
// (TODO: sort out the timing/looping problems)
|
// (TODO: sort out the timing/looping problems)
|
||||||
|
|
||||||
size_t boneCount = skeleton.GetBoneCount();
|
size_t boneCount = skeleton.GetBoneCount();
|
||||||
|
|||||||
Reference in New Issue
Block a user