diff options
author | nrp <olpc@spongezone.net> | 2008-08-31 18:24:39 (GMT) |
---|---|---|
committer | nrp <olpc@spongezone.net> | 2008-08-31 18:24:39 (GMT) |
commit | c6764388bbdd3c053b9dd7d9a13ccb0aa6815ac0 (patch) | |
tree | d908d79bdb46b2fc2a0d18357b7c93904e75a60b | |
parent | e96abf6926e8ccae5fbab81edddd2b4e9aec7b34 (diff) |
joint bug fix
-rw-r--r-- | tools.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -287,12 +287,17 @@ class BridgeJointTool(Tool): include_static=True) if not bodies or len(bodies) > 2: return + jointDef = box2d.b2RevoluteJointDef() if len(bodies) == 1: if not bodies[0].IsStatic(): 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)) + bodies[0], self.to_b2vec(event.pos)) + else: + return + else: + return elif len(bodies) == 2: if bodies[0].IsStatic(): jointDef.Initialize(self.game.world.world.GetGroundBody(), |