On 06.06.2006, at 11:15, Karl Bartel wrote:
Thanks for the patch. It will be included in the next upstream
release, which will be released this month, if everything works out
as planned.
I just uploaded a new release. The code worked out quite different
than in the patch, because I wanted to add a "Sound on/off" switch
without adding an additional conditional around each line where a
sound is played. This bug should be fixed nevertheless.
I didn't manage to disable my sound card (well, I didn't try very
hard...) to verify this, so it would be great if you could let me
know whether it works for you.
Thanks for your help,
Karl
On 05.06.2006, at 18:46, John Lightsey wrote:
On Tue, 2006-05-30 at 18:07 +0300, Timo Juhani Lindfors wrote:
Package: castle-combat
Version: 0.8.0-2
Severity: grave
Justification: renders package unusable
When two local players play the game it throws
...
File "/usr/share/games/castle-combat/scripts/cannon.py", line
21, in __init__
sound.cannon.play()
exceptions.AttributeError: 'module' object has no attribute 'cannon'
when player #1 tries to fire the cannon. If you can't reproduce this
please ask for more info.
Thanks for pointing this out. This problem comes up when you play
castle-combat without any sound device. The cannon sound is
loaded in
sound.py after "if pygame.mixer.get_init():". This will be false
when
there is no sound device and the cannon sounds will not be
loaded. When
the cannon (and wall hit) sounds are played in cannon.py there is no
test to see if the sounds were successfully loaded.
I'm not certain if calling pygame.mixer.get_init() each time a cannon
shot sound is played would cause a notable performance hit and my
knowledge of python is still very limited, so I'll just add an
"enabled"
flag to sound.py and check it in cannon.py before the sounds are
played.
A patch with the changes I'm applying to the next Debian release of
castle-combat is attached to this message.
John
<16-no_sound_device.dpatch>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]