dmuratshin 10 年之前
父节点
当前提交
505a4fccad
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      oxygine/src/TweenAnim.cpp

+ 5 - 0
oxygine/src/TweenAnim.cpp

@@ -55,12 +55,17 @@ namespace oxygine
     {
     {
         OX_ASSERT(_resAnim);
         OX_ASSERT(_resAnim);
         int frame;
         int frame;
+
+        if (p >= 1.0f)
+            p = 0.9999999f;
+
         if (_start > _end)
         if (_start > _end)
             frame = - int((_start + 1 - _end) * p);
             frame = - int((_start + 1 - _end) * p);
         else
         else
             frame =   int((_end   + 1 - _start) * p);
             frame =   int((_end   + 1 - _start) * p);
 
 
         frame += _start;
         frame += _start;
+
         /*
         /*
         static int lastFrame = -1;
         static int lastFrame = -1;
         static int ltime = 0;
         static int ltime = 0;