Browse Source

use == instead of is to compare physics objects

Darren Ranalli 18 years ago
parent
commit
ca4d42804a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/controls/ShipPilot.py

+ 1 - 1
direct/src/controls/ShipPilot.py

@@ -82,7 +82,7 @@ class ShipPilot(PhysicsWalker):
             # this could still break if we have more than one ShipPilot referencing
             # this could still break if we have more than one ShipPilot referencing
             # a single boat
             # a single boat
             if (self.ship is not None and
             if (self.ship is not None and
-                base.controlForce.getPhysicsObject() is self.ship.node().getPhysicsObject()):
+                base.controlForce.getPhysicsObject() == self.ship.node().getPhysicsObject()):
                 base.controlForce.clearPhysicsObject()
                 base.controlForce.clearPhysicsObject()
                 base.controlForce.setVector(Vec3(0))
                 base.controlForce.setVector(Vec3(0))
             self.takedownPhysics()
             self.takedownPhysics()