浏览代码

Merge pull request #52543 from TokageItLab/fixed-transition-when-xfade-time-is-zero

Fixed `AnimationNodeTransition`'s behavior when xfade time is zero
Rémi Verschelde 4 年之前
父节点
当前提交
d54635d9b0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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
 
-		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