diff options
Diffstat (limited to 'tools.py')
-rw-r--r-- | tools.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -216,8 +216,15 @@ class DestroyTool(Tool): if len(self.vertices) > 10: self.vertices.pop(0) tokill = self.game.world.get_bodies_at_pos(pygame.mouse.get_pos()) - if tokill: + if tokill: + joint = tokill[0].GetJointList() + if joint: + self.game.bridge.joint_deleted() + while joint.next: + joint = joint.next + self.game.bridge.joint_deleted() self.game.world.world.DestroyBody(tokill[0]) + self.game.bridge.box_deleted() elif event.type == MOUSEBUTTONUP and event.button == 1: self.cancel() def draw(self): |