Pārlūkot izejas kodu

Properly handle time wrapping when the range is 0

BearishSun 9 gadi atpakaļ
vecāks
revīzija
aa19851692
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      Source/BansheeCore/Source/BsAnimationUtility.cpp

+ 6 - 0
Source/BansheeCore/Source/BsAnimationUtility.cpp

@@ -41,6 +41,12 @@ namespace BansheeEngine
 	{
 		float length = end - start;
 
+		if(Math::approxEquals(length, 0.0f))
+		{
+			time = 0.0f;
+			return;
+		}
+
 		// Clamp to start or loop
 		if (time < start)
 		{