Explorar o código

fixed AnimationNodeTransition when xfade time is zero

Silc 'Tokage' Renew %!s(int64=4) %!d(string=hai) anos
pai
achega
02d8166427
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/animation/animation_blend_tree.cpp

+ 1 - 1
scene/animation/animation_blend_tree.cpp

@@ -718,7 +718,7 @@ double AnimationNodeTransition::process(double p_time, bool p_seek) {
 
 
 	} else { // cross-fading from prev to current
 	} else { // cross-fading from prev to current
 
 
-		float blend = xfade ? (prev_xfading / xfade) : 1;
+		float blend = xfade == 0 ? 0 : (prev_xfading / xfade);
 
 
 		if (!p_seek && switched) { //just switched, seek to start of current
 		if (!p_seek && switched) { //just switched, seek to start of current