mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Sanity check for sequence times.
If the sequence end time is greater than 1000, millisecond timestamps are automatically assigned.
This commit is contained in:
parent
4ee5fbfc12
commit
9c8271a64b
1 changed files with 6 additions and 0 deletions
|
|
@ -69,6 +69,12 @@ AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Timing specified in seconds or ms depending on format
|
{ // Timing specified in seconds or ms depending on format
|
||||||
|
if (maxEndTime > 1000.0f || mAnim->mDuration > 1000.0f)
|
||||||
|
{
|
||||||
|
timeFactor = 1000.0f; // If it's more than 1000 seconds, assume it's ms.
|
||||||
|
Con::setIntVariable("$Assimp::AnimTiming", 1000);
|
||||||
|
}
|
||||||
|
|
||||||
timeFactor = mClamp(timeFactor, 1, 1000);
|
timeFactor = mClamp(timeFactor, 1, 1000);
|
||||||
minFrameTime /= (F32)timeFactor;
|
minFrameTime /= (F32)timeFactor;
|
||||||
maxEndTime /= (F32)timeFactor;
|
maxEndTime /= (F32)timeFactor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue