From 621ffa66628afe5543ce6dff3d7e676e6d92ede8 Mon Sep 17 00:00:00 2001 From: nrp Date: Sun, 31 Aug 2008 18:20:37 +0000 Subject: Merge branch 'master' of git+ssh://physics03@dev.laptop.org/git/projects/physics03 Conflicts: bridge.py tools.py --- (limited to 'tools.py') diff --git a/tools.py b/tools.py index 4ad4d46..13a43c8 100644 --- a/tools.py +++ b/tools.py @@ -37,7 +37,7 @@ class Tool(object): self.game.bridge.create_train() self.game.world.run_physics = not self.game.world.run_physics elif event.key == K_t: - self.game.bridge.create_train() + self.game.bridge.create_train(force=True) elif event.key == K_b: self.game.setTool("box") elif event.key == K_c: @@ -293,7 +293,7 @@ class BridgeJointTool(Tool): if event.pos[1] > 550 and (event.pos[0] < 350 or event.pos[0] > 850): jointDef.Initialize(self.game.world.world.GetGroundBody(), bodies[0], self.to_b2vec(event.pos)) - else: + elif len(bodies) == 2: if bodies[0].IsStatic(): jointDef.Initialize(self.game.world.world.GetGroundBody(), bodies[1], self.to_b2vec(event.pos)) -- cgit v0.9.1