Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools.py')
-rw-r--r--tools.py4
1 files changed, 2 insertions, 2 deletions
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))