Browse Source

changed friction out of range check

Dave Schuyler 20 years ago
parent
commit
b164ac1834
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/physics/physicsCollisionHandler.cxx

+ 1 - 1
panda/src/physics/physicsCollisionHandler.cxx

@@ -69,7 +69,7 @@ apply_friction(ColliderDef &def, LVector3f& vel, const LVector3f& force, float a
     physics_debug("  vel pre  friction "<<vel<<" len "<<vel.length());
     physics_debug("  vel pre  friction "<<vel<<" len "<<vel.length());
     float friction=friction_coefficient*angle;
     float friction=friction_coefficient*angle;
     physics_debug("  friction "<<friction);
     physics_debug("  friction "<<friction);
-    if (friction<0.0f && friction>1.0f) {
+    if (friction<0.0f || friction>1.0f) {
       cerr<<"\n\nfriction error "<<friction<<endl;
       cerr<<"\n\nfriction error "<<friction<<endl;
       friction=1.0f;
       friction=1.0f;
     }
     }