Преглед на файлове

Fixed Spline and MotionPath init issue when setting a curve tension before adding way points

Nehon преди 11 години
родител
ревизия
dd7ea3d2a7
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      jme3-core/src/main/java/com/jme3/math/Spline.java

+ 1 - 1
jme3-core/src/main/java/com/jme3/math/Spline.java

@@ -316,7 +316,7 @@ public class Spline implements Savable {
      */
     public void setCurveTension(float curveTension) {
         this.curveTension = curveTension;
-        if(type==SplineType.CatmullRom) {
+        if(type==SplineType.CatmullRom && !getControlPoints().isEmpty()) {            
         	this.computeTotalLentgh();
         }
     }