#! /bin/sh /usr/share/dpatch/dpatch-run ## 16-no_sound_device.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad castle-combat-0.8.0~/src/cannon.py castle-combat-0.8.0/src/cannon.py --- castle-combat-0.8.0~/src/cannon.py 2005-05-29 09:41:11.000000000 -0500 +++ castle-combat-0.8.0/src/cannon.py 2006-06-05 11:23:10.000000000 -0500 @@ -18,7 +18,8 @@ self.target = tuple(target) self.time_since_start = 0.0 self.time_to_target = math.hypot(self.origin[0] - target[0], self.origin[1] - target[1]) * 7 - sound.cannon.play() + if sound.enabled: + sound.cannon.play() def draw(self): common.blit(self.shot_pic, self.get_pos(), centered=True) @@ -34,7 +35,8 @@ self.ratio = 1 if (self.ratio >= 1): # target hit - sound.wall_hit.play() + if sound.enabled: + sound.wall_hit.play() self.ratio = 1 get_game().shots.remove(self) if get_game().server: diff -urNad castle-combat-0.8.0~/src/sound.py castle-combat-0.8.0/src/sound.py --- castle-combat-0.8.0~/src/sound.py 2005-10-08 07:58:29.000000000 -0500 +++ castle-combat-0.8.0/src/sound.py 2006-06-05 11:22:14.000000000 -0500 @@ -7,6 +7,7 @@ music_files = ('farmor8.xm', 'fdream.xm') next_file = random.randint(0, len(music_files)-1) +enabled = False def play_music(): if pygame.mixer.get_init(): @@ -19,5 +20,5 @@ if pygame.mixer.get_init(): cannon = pygame.mixer.Sound(os.path.join(common.data_path, 'sound', 'cannon.wav')) wall_hit = pygame.mixer.Sound(os.path.join(common.data_path, 'sound', 'drop.wav')) - + enabled = True