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.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools.py b/tools.py
index 8fc1261..51eeefe 100644
--- a/tools.py
+++ b/tools.py
@@ -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):