Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-08-30 22:49:32 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-08-30 22:49:32 (GMT)
commit233d543dab3f0a656d1e34ed306a08ffcee85c73 (patch)
tree173f7dfe41e0e68e5ed5c30401a9ae0847a0a055 /tools.py
parentf837fb6f1d40087a3686d2e22c70e05be02e58f3 (diff)
destroy joints when excess force is applied
Diffstat (limited to 'tools.py')
-rw-r--r--tools.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools.py b/tools.py
index 1302d8c..0bb4c90 100644
--- a/tools.py
+++ b/tools.py
@@ -451,13 +451,11 @@ class BridgeJointTool(Tool):
if event.type != MOUSEBUTTONUP or event.button != 1:
return
- print "mouse button up"
- bodies = self.game.world.get_bodies_at_pos(event.pos)
+ bodies = self.game.world.get_bodies_at_pos(event.pos,
+ include_static=True)
if not bodies or len(bodies) != 2:
return
- print bodies[0]
- print bodies[1]
jointDef = box2d.b2RevoluteJointDef()
jointDef.Initialize(bodies[0], bodies[1], self.to_b2vec(event.pos))
joint = self.game.world.world.CreateJoint(jointDef)