浏览代码

fix #383 : in PhysicsRigidBody the old statement in read() (l.741) was always false

Dokthar 9 年之前
父节点
当前提交
00c687b4d8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

+ 2 - 2
jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java

@@ -737,8 +737,8 @@ public class PhysicsRigidBody extends PhysicsCollisionObject {
         setKinematic(capsule.readBoolean("kinematic", false));
 
         setRestitution(capsule.readFloat("restitution", 0));
-        Vector3f angularFactor = (Vector3f) capsule.readSavable("angularFactor", Vector3f.NAN.clone());
-        if(angularFactor == Vector3f.NAN) {
+        Vector3f angularFactor = (Vector3f) capsule.readSavable("angularFactor", null);
+        if(angularFactor == null) {
             setAngularFactor(capsule.readFloat("angularFactor", 1));
         } else {
             setAngularFactor(angularFactor);