Răsfoiți Sursa

Properly handle time wrapping when the range is 0

BearishSun 9 ani în urmă
părinte
comite
aa19851692
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  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;
 		float length = end - start;
 
 
+		if(Math::approxEquals(length, 0.0f))
+		{
+			time = 0.0f;
+			return;
+		}
+
 		// Clamp to start or loop
 		// Clamp to start or loop
 		if (time < start)
 		if (time < start)
 		{
 		{